{"action":"opened","issue":{"url":"https://api.github.com/repos/embulk/embulk/issues/325","labels_url":"https://api.github.com/repos/embulk/embulk/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/embulk/embulk/issues/325/comments","events_url":"https://api.github.com/repos/embulk/embulk/issues/325/events","html_url":"https://github.com/embulk/embulk/issues/325","id":112338480,"number":325,"title":"Exit code always 0 in Cygwin","user":{"login":"hito4t","id":9376466,"avatar_url":"https://avatars.githubusercontent.com/u/9376466?v=3","gravatar_id":"","url":"https://api.github.com/users/hito4t","html_url":"https://github.com/hito4t","followers_url":"https://api.github.com/users/hito4t/followers","following_url":"https://api.github.com/users/hito4t/following{/other_user}","gists_url":"https://api.github.com/users/hito4t/gists{/gist_id}","starred_url":"https://api.github.com/users/hito4t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hito4t/subscriptions","organizations_url":"https://api.github.com/users/hito4t/orgs","repos_url":"https://api.github.com/users/hito4t/repos","events_url":"https://api.github.com/users/hito4t/events{/privacy}","received_events_url":"https://api.github.com/users/hito4t/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-20T10:42:03Z","updated_at":"2015-10-20T10:42:03Z","closed_at":null,"body":"When an exception is thrown in Embulk, exit code is 1.\r\nBut when executing Embulk in Cygwin, exit code is always 0.\r\n\r\nIf selfrun.sh is modified as follows, correct exit code will be returned.\r\n<pre>\r\njava %java_args% -jar %this% %jruby_args% %args%\r\n\r\nendlocal\r\n\r\nexit /b\r\n</pre>\r\n↓\r\n<pre>\r\njava %java_args% -jar %this% %jruby_args% %args%\r\n\r\nendlocal\r\n\r\nexit /b %ERRORLEVEL%\r\n</pre>"}}