{"action":"created","issue":{"url":"https://api.github.com/repos/filipw/dotnet-script/issues/158","repository_url":"https://api.github.com/repos/filipw/dotnet-script","labels_url":"https://api.github.com/repos/filipw/dotnet-script/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/filipw/dotnet-script/issues/158/comments","events_url":"https://api.github.com/repos/filipw/dotnet-script/issues/158/events","html_url":"https://github.com/filipw/dotnet-script/issues/158","id":269688073,"number":158,"title":"Propagate the return value from a script as the process exit code","user":{"login":"adamralph","id":677704,"avatar_url":"https://avatars2.githubusercontent.com/u/677704?v=4","gravatar_id":"","url":"https://api.github.com/users/adamralph","html_url":"https://github.com/adamralph","followers_url":"https://api.github.com/users/adamralph/followers","following_url":"https://api.github.com/users/adamralph/following{/other_user}","gists_url":"https://api.github.com/users/adamralph/gists{/gist_id}","starred_url":"https://api.github.com/users/adamralph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamralph/subscriptions","organizations_url":"https://api.github.com/users/adamralph/orgs","repos_url":"https://api.github.com/users/adamralph/repos","events_url":"https://api.github.com/users/adamralph/events{/privacy}","received_events_url":"https://api.github.com/users/adamralph/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-30T17:32:52Z","updated_at":"2017-10-31T00:44:31Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"With csi.exe, the `int` returned from a script (it is only allowed to be an `int`) is propagated as the process exit code. E.g. if I return `0` from my script, csi.exe exits with `0` which indicates no error. If I return `1` from my script, `csi.exe` exits with `1`, which indicates an error.\r\n\r\n`dotnet-script` should match this behaviour from `csi.exe`. Specifically, we need the runner to behave in this manner to support this proposal for simple-targets-csx: https://github.com/adamralph/simple-targets-csx/issues/49"},"comment":{"url":"https://api.github.com/repos/filipw/dotnet-script/issues/comments/340626511","html_url":"https://github.com/filipw/dotnet-script/issues/158#issuecomment-340626511","issue_url":"https://api.github.com/repos/filipw/dotnet-script/issues/158","id":340626511,"user":{"login":"adamralph","id":677704,"avatar_url":"https://avatars2.githubusercontent.com/u/677704?v=4","gravatar_id":"","url":"https://api.github.com/users/adamralph","html_url":"https://github.com/adamralph","followers_url":"https://api.github.com/users/adamralph/followers","following_url":"https://api.github.com/users/adamralph/following{/other_user}","gists_url":"https://api.github.com/users/adamralph/gists{/gist_id}","starred_url":"https://api.github.com/users/adamralph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamralph/subscriptions","organizations_url":"https://api.github.com/users/adamralph/orgs","repos_url":"https://api.github.com/users/adamralph/repos","events_url":"https://api.github.com/users/adamralph/events{/privacy}","received_events_url":"https://api.github.com/users/adamralph/received_events","type":"User","site_admin":false},"created_at":"2017-10-31T00:44:31Z","updated_at":"2017-10-31T00:44:31Z","author_association":"CONTRIBUTOR","body":"This isn't for compilation errors. This is for when the script compiles, and runs to completion with no exception being thrown. At the end of the script an integer is returned, and that integer is propagated to the OS as the exit code of dotnet-script."}}
{"actor":{"display_login":"adamralph"}}