{"action":"closed","issue":{"url":"https://api.github.com/repos/driftyco/ionic-cli/issues/655","repository_url":"https://api.github.com/repos/driftyco/ionic-cli","labels_url":"https://api.github.com/repos/driftyco/ionic-cli/issues/655/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-cli/issues/655/comments","events_url":"https://api.github.com/repos/driftyco/ionic-cli/issues/655/events","html_url":"https://github.com/driftyco/ionic-cli/issues/655","id":117555088,"number":655,"title":"invalid exit code for hooks after an error","user":{"login":"aszmyd","id":3050805,"avatar_url":"https://avatars.githubusercontent.com/u/3050805?v=3","gravatar_id":"","url":"https://api.github.com/users/aszmyd","html_url":"https://github.com/aszmyd","followers_url":"https://api.github.com/users/aszmyd/followers","following_url":"https://api.github.com/users/aszmyd/following{/other_user}","gists_url":"https://api.github.com/users/aszmyd/gists{/gist_id}","starred_url":"https://api.github.com/users/aszmyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aszmyd/subscriptions","organizations_url":"https://api.github.com/users/aszmyd/orgs","repos_url":"https://api.github.com/users/aszmyd/repos","events_url":"https://api.github.com/users/aszmyd/events{/privacy}","received_events_url":"https://api.github.com/users/aszmyd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-11-18T10:14:29Z","updated_at":"2016-09-30T18:12:17Z","closed_at":"2016-09-30T18:12:17Z","body":"When we have some error in hook (even simple `throw 'Error'`) and we use ionic-cli to i.e. add new platform or plugin, the exit code after the command is 0 but it should not be because of error thrown in hook.\r\nUsing normal `cordova` command line tool, it breaks as it should.\r\n\r\nExample:\r\n\r\n**hooks/after_plugin_add/hook.js**\r\n``` \r\n#!/usr/bin/env node\r\n\r\nthrow 'Error'\r\n```\r\n\r\nShell script to execute:\r\n```\r\nionic plugin add foo\r\nionic plugin add bar\r\n```\r\n\r\nthis **DOES NOT** break. But this:\r\n\r\n```\r\ncordova plugin add foo\r\ncordova plugin add bar\r\n```\r\n\r\nbreaks and it should. \r\n\r\nAbove behavior does not allow CI build script to work as expected - break on errors. "}}
{"actor":{"display_login":"jthoms1"}}