{"action":"created","issue":{"url":"https://api.github.com/repos/Masterminds/glide/issues/147","labels_url":"https://api.github.com/repos/Masterminds/glide/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/Masterminds/glide/issues/147/comments","events_url":"https://api.github.com/repos/Masterminds/glide/issues/147/events","html_url":"https://github.com/Masterminds/glide/issues/147","id":118559798,"number":147,"title":"Exit code reports 0 in case of failures","user":{"login":"gdm85","id":7117866,"avatar_url":"https://avatars.githubusercontent.com/u/7117866?v=3","gravatar_id":"","url":"https://api.github.com/users/gdm85","html_url":"https://github.com/gdm85","followers_url":"https://api.github.com/users/gdm85/followers","following_url":"https://api.github.com/users/gdm85/following{/other_user}","gists_url":"https://api.github.com/users/gdm85/gists{/gist_id}","starred_url":"https://api.github.com/users/gdm85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdm85/subscriptions","organizations_url":"https://api.github.com/users/gdm85/orgs","repos_url":"https://api.github.com/users/gdm85/repos","events_url":"https://api.github.com/users/gdm85/events{/privacy}","received_events_url":"https://api.github.com/users/gdm85/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Masterminds/glide/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-24T08:49:25Z","updated_at":"2015-11-24T22:31:56Z","closed_at":null,"body":"\r\nDuring continuous integration one chains up many tools by using their successful exit code as a signal that everything went fine.\r\n\r\n```\r\ngdm85@goworld:~/source/glide$ sudo chown root.root vendor/ -R\r\n[sudo] password for gdm85: \r\ngdm85@goworld:~/source/glide$ glide up\r\n[INFO] Fetching updates for gopkg.in/yaml.v2.\r\n[WARN] Download failed.\r\n[WARN] Update failed for gopkg.in/yaml.v2: exit status 255\r\n[INFO] Fetching updates for github.com/Masterminds/cookoo.\r\n[WARN] Download failed.\r\n[WARN] Update failed for github.com/Masterminds/cookoo: exit status 255\r\n[INFO] Fetching updates for github.com/Masterminds/vcs.\r\n[WARN] Download failed.\r\n[WARN] Update failed for github.com/Masterminds/vcs: exit status 255\r\n[INFO] Fetching updates for github.com/codegangsta/cli.\r\n[WARN] Download failed.\r\n[WARN] Update failed for github.com/codegangsta/cli: exit status 255\r\n[INFO] Fetching updates for github.com/Masterminds/semver.\r\n[WARN] Download failed.\r\n[WARN] Update failed for github.com/Masterminds/semver: exit status 255\r\n[INFO] Setting version for github.com/Masterminds/cookoo to master.\r\n[ERROR] Failed to set version to master: exit status 128\r\n[WARN] Failed to set version on github.com/Masterminds/cookoo to master: exit status 128\r\n[INFO] Detected semantic version. Setting version for github.com/Masterminds/vcs to 1.3.0.\r\n[ERROR] Failed to set version to ^1.2.0: exit status 128\r\n[WARN] Failed to set version on github.com/Masterminds/vcs to ^1.2.0: exit status 128\r\n[INFO] Detected semantic version. Setting version for github.com/Masterminds/semver to 1.0.0.\r\n[ERROR] Failed to set version to ^1.0.0: exit status 128\r\n[WARN] Failed to set version on github.com/Masterminds/semver to ^1.0.0: exit status 128\r\n[INFO] Package gopkg.in/yaml.v2 manages its own dependencies\r\n[INFO] Found glide.yaml in /home/gdm85/source/glide/vendor/github.com/Masterminds/cookoo/glide.yaml\r\n[INFO] Package github.com/Masterminds/vcs manages its own dependencies\r\n[INFO] Package github.com/codegangsta/cli manages its own dependencies\r\n[INFO] Package github.com/Masterminds/semver manages its own dependencies\r\n[INFO] Detected semantic version. Setting version for github.com/Masterminds/vcs to 1.3.0.\r\n[ERROR] Failed to set version to ^1.2.0: exit status 128\r\n[WARN] Problem setting version on github.com/Masterminds/vcs: exit status 128 (flatten)\r\n[INFO] Detected semantic version. Setting version for github.com/Masterminds/semver to 1.0.0.\r\n[ERROR] Failed to set version to ^1.0.0: exit status 128\r\n[WARN] Problem setting version on github.com/Masterminds/semver: exit status 128 (flatten)\r\n[INFO] Setting version for github.com/Masterminds/cookoo to master.\r\n[ERROR] Failed to set version to master: exit status 128\r\n[WARN] Problem setting version on github.com/Masterminds/cookoo: exit status 128 (flatten)\r\n[INFO] Project relies on 5 dependencies.\r\ngdm85@goworld:~/source/glide$ echo $?\r\n0\r\ngdm85@goworld:~/source/glide$ \r\n```\r\n\r\nI would expect the exit code above to be non-zero, as nothing went fine :smiley: "},"comment":{"url":"https://api.github.com/repos/Masterminds/glide/issues/comments/159427278","html_url":"https://github.com/Masterminds/glide/issues/147#issuecomment-159427278","issue_url":"https://api.github.com/repos/Masterminds/glide/issues/147","id":159427278,"user":{"login":"gdm85","id":7117866,"avatar_url":"https://avatars.githubusercontent.com/u/7117866?v=3","gravatar_id":"","url":"https://api.github.com/users/gdm85","html_url":"https://github.com/gdm85","followers_url":"https://api.github.com/users/gdm85/followers","following_url":"https://api.github.com/users/gdm85/following{/other_user}","gists_url":"https://api.github.com/users/gdm85/gists{/gist_id}","starred_url":"https://api.github.com/users/gdm85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdm85/subscriptions","organizations_url":"https://api.github.com/users/gdm85/orgs","repos_url":"https://api.github.com/users/gdm85/repos","events_url":"https://api.github.com/users/gdm85/events{/privacy}","received_events_url":"https://api.github.com/users/gdm85/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T22:31:56Z","updated_at":"2015-11-24T22:31:56Z","body":"Propagating the error through the various layers is probably going to make it look less elegant, but it will be functionally more valuable. What I do for example with workers is collect all the statuses and then have them returned as a composite one ([coshell](https://github.com/gdm85/coshell) is a notorious example of this pattern).\r\n\r\nI can try to make a PR but if you were already on it I will not, you probably have more insight on this."}}