{"action":"created","issue":{"url":"https://api.github.com/repos/geany/geany/issues/1300","repository_url":"https://api.github.com/repos/geany/geany","labels_url":"https://api.github.com/repos/geany/geany/issues/1300/labels{/name}","comments_url":"https://api.github.com/repos/geany/geany/issues/1300/comments","events_url":"https://api.github.com/repos/geany/geany/issues/1300/events","html_url":"https://github.com/geany/geany/pull/1300","id":188923930,"number":1300,"title":"WIP: Windows (and Linux) spawn fixes","user":{"login":"b4n","id":793526,"avatar_url":"https://avatars.githubusercontent.com/u/793526?v=3","gravatar_id":"","url":"https://api.github.com/users/b4n","html_url":"https://github.com/b4n","followers_url":"https://api.github.com/users/b4n/followers","following_url":"https://api.github.com/users/b4n/following{/other_user}","gists_url":"https://api.github.com/users/b4n/gists{/gist_id}","starred_url":"https://api.github.com/users/b4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b4n/subscriptions","organizations_url":"https://api.github.com/users/b4n/orgs","repos_url":"https://api.github.com/users/b4n/repos","events_url":"https://api.github.com/users/b4n/events{/privacy}","received_events_url":"https://api.github.com/users/b4n/received_events","type":"User","site_admin":false},"labels":[{"id":118726805,"url":"https://api.github.com/repos/geany/geany/labels/bug","name":"bug","color":"e11d21","default":true},{"id":98659950,"url":"https://api.github.com/repos/geany/geany/labels/enhancement","name":"enhancement","color":"207de5","default":true},{"id":118726233,"url":"https://api.github.com/repos/geany/geany/labels/windows","name":"windows","color":"ffaaff","default":false},{"id":307473105,"url":"https://api.github.com/repos/geany/geany/labels/work%20in%20progress","name":"work in progress","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-12T17:38:14Z","updated_at":"2016-11-12T20:20:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/geany/geany/pulls/1300","html_url":"https://github.com/geany/geany/pull/1300","diff_url":"https://github.com/geany/geany/pull/1300.diff","patch_url":"https://github.com/geany/geany/pull/1300.patch"},"body":"Based off #1095 and comments, plus some code I wrote ages ago (and have been using since then)\r\n\r\nMain things\r\n* Use `CreateProcessW()` on Windows\r\n* Use an installed run script rather than a dynamically created one\r\n* Fix replacing build command placeholders on non-Windows so that everything is always properly quoted.  This is based on some quoting code I wrote ages ago to fix a \"security\" issue we have that a very special filename can execute arbitrary commands.  This has 2 main advantages\r\n  * placeholders replacements are always properly quoted (minus bugs in the code, but I'm using it for a while now in my own machine: initial version is from 2012 and I had one single relevant fix since then, more than one year ago)\r\n  * placeholders in a placeholder replacement isn't replaced again.  Currently in master, each pattern is replaced, and then the next, lading to possibly finding placeholders inside a previous replacement.  With my patch, it's replaced in one go, and only from the source string.\r\n  Also something like this is required to be able to replace \"complex\" placeholders, like full commands to pass to `sh -c` like we do in the run command.  Without something clever, it's virtually impossible to get correct quoting for this.\r\n  \r\n  A better way to fix it *could* be to replace placeholders after having split the arguments; however it requires lot of care and possibly conditional code too, in order to support all of *NIX, Window, and VTE.  And there would have to be an argv-to-commandline anyway, as we need to have a way to pass an argument to `sh -c`.\r\n  \r\n  Good Windows support is missing, and currently no extra quoting is done here, so no changes on the placeholders there apart from replacing all at once.\r\n\r\nOn Windows, it should fix all the spawning issues related to non-ASCII filenames.  On Linux, it should not change much apart from properly replacing placeholders, and possibly some uncommon things like if the run script could not be created for some reason.\r\n\r\n**Warning:** currently the new run script doesn't `cd` to the working directory configured in the build command, and this relies on us setting the proper working directory when spawning the command itself.  If this breaks anything (like possibly a *.profile* that `cd`s somewhere?), it could be added back."},"comment":{"url":"https://api.github.com/repos/geany/geany/issues/comments/260145847","html_url":"https://github.com/geany/geany/pull/1300#issuecomment-260145847","issue_url":"https://api.github.com/repos/geany/geany/issues/1300","id":260145847,"user":{"login":"codebrainz","id":181177,"avatar_url":"https://avatars.githubusercontent.com/u/181177?v=3","gravatar_id":"","url":"https://api.github.com/users/codebrainz","html_url":"https://github.com/codebrainz","followers_url":"https://api.github.com/users/codebrainz/followers","following_url":"https://api.github.com/users/codebrainz/following{/other_user}","gists_url":"https://api.github.com/users/codebrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/codebrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codebrainz/subscriptions","organizations_url":"https://api.github.com/users/codebrainz/orgs","repos_url":"https://api.github.com/users/codebrainz/repos","events_url":"https://api.github.com/users/codebrainz/events{/privacy}","received_events_url":"https://api.github.com/users/codebrainz/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T20:20:23Z","updated_at":"2016-11-12T20:20:23Z","body":"Looks good conceptually."}}
{"actor":{"display_login":"codebrainz"}}