{"action":"created","comment":{"url":"https://api.github.com/repos/runatlantis/atlantis/pulls/comments/190748986","pull_request_review_id":123194768,"id":190748986,"diff_hunk":"@@ -134,11 +135,23 @@ func downloadAndUnzip(url string, path string, target string) error {\n \treturn unzip(path, target)\n }\n \n-func executeCmd(cmd string, args []string) (*exec.Cmd, error) {\n+// Executes a command, waits for it to finish and returns any errors.\n+func executeCmd(cmd string, args []string) error {\n \tcommand := exec.Command(cmd, args...) // #nosec\n-\terr := command.Start()\n-\tif err != nil {\n-\t\treturn nil, err\n-\t}\n-\treturn command, nil\n+\treturn command.Run()\n+}\n+\n+// Executes a command in the background. Returns a context so that the caller may cancel the\n+// command prematurely if necessary, as well as an errors channel.\n+func executeBackgroundCmd(cmd string, args []string) (context.CancelFunc, <-chan error) {","path":"bootstrap/utils.go","position":26,"original_position":26,"commit_id":"e80120ebf4a8f29131b6bbf2b298b4e69ea39735","original_commit_id":"e80120ebf4a8f29131b6bbf2b298b4e69ea39735","user":{"login":"lkysow","id":1034429,"avatar_url":"https://avatars1.githubusercontent.com/u/1034429?v=4","gravatar_id":"","url":"https://api.github.com/users/lkysow","html_url":"https://github.com/lkysow","followers_url":"https://api.github.com/users/lkysow/followers","following_url":"https://api.github.com/users/lkysow/following{/other_user}","gists_url":"https://api.github.com/users/lkysow/gists{/gist_id}","starred_url":"https://api.github.com/users/lkysow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkysow/subscriptions","organizations_url":"https://api.github.com/users/lkysow/orgs","repos_url":"https://api.github.com/users/lkysow/repos","events_url":"https://api.github.com/users/lkysow/events{/privacy}","received_events_url":"https://api.github.com/users/lkysow/received_events","type":"User","site_admin":false},"body":"Also worth noting that in the end the call to `cancel()` just sends `SIGKILL` so it's the same thing.\r\n> The provided context is used to kill the process (by calling os.Process.Kill) if the context becomes done before the command completes on its own.","created_at":"2018-05-24T22:29:19Z","updated_at":"2018-05-24T22:29:19Z","html_url":"https://github.com/runatlantis/atlantis/pull/130#discussion_r190748986","pull_request_url":"https://api.github.com/repos/runatlantis/atlantis/pulls/130","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/runatlantis/atlantis/pulls/comments/190748986"},"html":{"href":"https://github.com/runatlantis/atlantis/pull/130#discussion_r190748986"},"pull_request":{"href":"https://api.github.com/repos/runatlantis/atlantis/pulls/130"}},"in_reply_to_id":190688207},"pull_request":{"url":"https://api.github.com/repos/runatlantis/atlantis/pulls/130","id":190042231,"html_url":"https://github.com/runatlantis/atlantis/pull/130","diff_url":"https://github.com/runatlantis/atlantis/pull/130.diff","patch_url":"https://github.com/runatlantis/atlantis/pull/130.patch","issue_url":"https://api.github.com/repos/runatlantis/atlantis/issues/130","number":130,"state":"open","locked":false,"title":"Improve error handling","user":{"login":"johananl","id":14969425,"avatar_url":"https://avatars2.githubusercontent.com/u/14969425?v=4","gravatar_id":"","url":"https://api.github.com/users/johananl","html_url":"https://github.com/johananl","followers_url":"https://api.github.com/users/johananl/followers","following_url":"https://api.github.com/users/johananl/following{/other_user}","gists_url":"https://api.github.com/users/johananl/gists{/gist_id}","starred_url":"https://api.github.com/users/johananl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johananl/subscriptions","organizations_url":"https://api.github.com/users/johananl/orgs","repos_url":"https://api.github.com/users/johananl/repos","events_url":"https://api.github.com/users/johananl/events{/privacy}","received_events_url":"https://api.github.com/users/johananl/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nThanks for the work on this awesome project!\r\n\r\nI've encountered a bug running `atlantis bootstrap` on Amazon Linux - the process failed to copy the Terraform binary to `/usr/local/bin` but the error got silently ignored. This error caused another error when running the Atlantis server, which got ignored, too.\r\n\r\nTherefore, I've refactored the overall error handling inside the bootstrap process. It doesn't fix the permissions problem on Amazon Linux (`sudo` needs to be used, which is outside the scope of this PR), but it does show an error to the user instead of reporting that everything is OK.\r\n\r\nAny comments are welcome :-)","created_at":"2018-05-23T16:56:02Z","updated_at":"2018-05-24T22:29:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aeb77b086506d49b8913e4c56e405b72f54b22d9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/runatlantis/atlantis/pulls/130/commits","review_comments_url":"https://api.github.com/repos/runatlantis/atlantis/pulls/130/comments","review_comment_url":"https://api.github.com/repos/runatlantis/atlantis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/runatlantis/atlantis/issues/130/comments","statuses_url":"https://api.github.com/repos/runatlantis/atlantis/statuses/e80120ebf4a8f29131b6bbf2b298b4e69ea39735","head":{"label":"johananl:bugfix/mv_terraform_error","ref":"bugfix/mv_terraform_error","sha":"e80120ebf4a8f29131b6bbf2b298b4e69ea39735","user":{"login":"johananl","id":14969425,"avatar_url":"https://avatars2.githubusercontent.com/u/14969425?v=4","gravatar_id":"","url":"https://api.github.com/users/johananl","html_url":"https://github.com/johananl","followers_url":"https://api.github.com/users/johananl/followers","following_url":"https://api.github.com/users/johananl/following{/other_user}","gists_url":"https://api.github.com/users/johananl/gists{/gist_id}","starred_url":"https://api.github.com/users/johananl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johananl/subscriptions","organizations_url":"https://api.github.com/users/johananl/orgs","repos_url":"https://api.github.com/users/johananl/repos","events_url":"https://api.github.com/users/johananl/events{/privacy}","received_events_url":"https://api.github.com/users/johananl/received_events","type":"User","site_admin":false},"repo":{"id":134560719,"name":"atlantis","full_name":"johananl/atlantis","owner":{"login":"johananl","id":14969425,"avatar_url":"https://avatars2.githubusercontent.com/u/14969425?v=4","gravatar_id":"","url":"https://api.github.com/users/johananl","html_url":"https://github.com/johananl","followers_url":"https://api.github.com/users/johananl/followers","following_url":"https://api.github.com/users/johananl/following{/other_user}","gists_url":"https://api.github.com/users/johananl/gists{/gist_id}","starred_url":"https://api.github.com/users/johananl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johananl/subscriptions","organizations_url":"https://api.github.com/users/johananl/orgs","repos_url":"https://api.github.com/users/johananl/repos","events_url":"https://api.github.com/users/johananl/events{/privacy}","received_events_url":"https://api.github.com/users/johananl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johananl/atlantis","description":"Terraform collaboration and automation for your team","fork":true,"url":"https://api.github.com/repos/johananl/atlantis","forks_url":"https://api.github.com/repos/johananl/atlantis/forks","keys_url":"https://api.github.com/repos/johananl/atlantis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johananl/atlantis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johananl/atlantis/teams","hooks_url":"https://api.github.com/repos/johananl/atlantis/hooks","issue_events_url":"https://api.github.com/repos/johananl/atlantis/issues/events{/number}","events_url":"https://api.github.com/repos/johananl/atlantis/events","assignees_url":"https://api.github.com/repos/johananl/atlantis/assignees{/user}","branches_url":"https://api.github.com/repos/johananl/atlantis/branches{/branch}","tags_url":"https://api.github.com/repos/johananl/atlantis/tags","blobs_url":"https://api.github.com/repos/johananl/atlantis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johananl/atlantis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johananl/atlantis/git/refs{/sha}","trees_url":"https://api.github.com/repos/johananl/atlantis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johananl/atlantis/statuses/{sha}","languages_url":"https://api.github.com/repos/johananl/atlantis/languages","stargazers_url":"https://api.github.com/repos/johananl/atlantis/stargazers","contributors_url":"https://api.github.com/repos/johananl/atlantis/contributors","subscribers_url":"https://api.github.com/repos/johananl/atlantis/subscribers","subscription_url":"https://api.github.com/repos/johananl/atlantis/subscription","commits_url":"https://api.github.com/repos/johananl/atlantis/commits{/sha}","git_commits_url":"https://api.github.com/repos/johananl/atlantis/git/commits{/sha}","comments_url":"https://api.github.com/repos/johananl/atlantis/comments{/number}","issue_comment_url":"https://api.github.com/repos/johananl/atlantis/issues/comments{/number}","contents_url":"https://api.github.com/repos/johananl/atlantis/contents/{+path}","compare_url":"https://api.github.com/repos/johananl/atlantis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johananl/atlantis/merges","archive_url":"https://api.github.com/repos/johananl/atlantis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johananl/atlantis/downloads","issues_url":"https://api.github.com/repos/johananl/atlantis/issues{/number}","pulls_url":"https://api.github.com/repos/johananl/atlantis/pulls{/number}","milestones_url":"https://api.github.com/repos/johananl/atlantis/milestones{/number}","notifications_url":"https://api.github.com/repos/johananl/atlantis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johananl/atlantis/labels{/name}","releases_url":"https://api.github.com/repos/johananl/atlantis/releases{/id}","deployments_url":"https://api.github.com/repos/johananl/atlantis/deployments","created_at":"2018-05-23T11:39:27Z","updated_at":"2018-05-23T11:39:29Z","pushed_at":"2018-05-24T22:02:10Z","git_url":"git://github.com/johananl/atlantis.git","ssh_url":"git@github.com:johananl/atlantis.git","clone_url":"https://github.com/johananl/atlantis.git","svn_url":"https://github.com/johananl/atlantis","homepage":"https://www.runatlantis.io","size":20981,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"runatlantis:master","ref":"master","sha":"f802732990f01072a3ee2a79c10414db9da9c8d9","user":{"login":"runatlantis","id":32311288,"avatar_url":"https://avatars2.githubusercontent.com/u/32311288?v=4","gravatar_id":"","url":"https://api.github.com/users/runatlantis","html_url":"https://github.com/runatlantis","followers_url":"https://api.github.com/users/runatlantis/followers","following_url":"https://api.github.com/users/runatlantis/following{/other_user}","gists_url":"https://api.github.com/users/runatlantis/gists{/gist_id}","starred_url":"https://api.github.com/users/runatlantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runatlantis/subscriptions","organizations_url":"https://api.github.com/users/runatlantis/orgs","repos_url":"https://api.github.com/users/runatlantis/repos","events_url":"https://api.github.com/users/runatlantis/events{/privacy}","received_events_url":"https://api.github.com/users/runatlantis/received_events","type":"Organization","site_admin":false},"repo":{"id":120519269,"name":"atlantis","full_name":"runatlantis/atlantis","owner":{"login":"runatlantis","id":32311288,"avatar_url":"https://avatars2.githubusercontent.com/u/32311288?v=4","gravatar_id":"","url":"https://api.github.com/users/runatlantis","html_url":"https://github.com/runatlantis","followers_url":"https://api.github.com/users/runatlantis/followers","following_url":"https://api.github.com/users/runatlantis/following{/other_user}","gists_url":"https://api.github.com/users/runatlantis/gists{/gist_id}","starred_url":"https://api.github.com/users/runatlantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runatlantis/subscriptions","organizations_url":"https://api.github.com/users/runatlantis/orgs","repos_url":"https://api.github.com/users/runatlantis/repos","events_url":"https://api.github.com/users/runatlantis/events{/privacy}","received_events_url":"https://api.github.com/users/runatlantis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/runatlantis/atlantis","description":"Terraform collaboration and automation for your team","fork":false,"url":"https://api.github.com/repos/runatlantis/atlantis","forks_url":"https://api.github.com/repos/runatlantis/atlantis/forks","keys_url":"https://api.github.com/repos/runatlantis/atlantis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/runatlantis/atlantis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/runatlantis/atlantis/teams","hooks_url":"https://api.github.com/repos/runatlantis/atlantis/hooks","issue_events_url":"https://api.github.com/repos/runatlantis/atlantis/issues/events{/number}","events_url":"https://api.github.com/repos/runatlantis/atlantis/events","assignees_url":"https://api.github.com/repos/runatlantis/atlantis/assignees{/user}","branches_url":"https://api.github.com/repos/runatlantis/atlantis/branches{/branch}","tags_url":"https://api.github.com/repos/runatlantis/atlantis/tags","blobs_url":"https://api.github.com/repos/runatlantis/atlantis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/runatlantis/atlantis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/runatlantis/atlantis/git/refs{/sha}","trees_url":"https://api.github.com/repos/runatlantis/atlantis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/runatlantis/atlantis/statuses/{sha}","languages_url":"https://api.github.com/repos/runatlantis/atlantis/languages","stargazers_url":"https://api.github.com/repos/runatlantis/atlantis/stargazers","contributors_url":"https://api.github.com/repos/runatlantis/atlantis/contributors","subscribers_url":"https://api.github.com/repos/runatlantis/atlantis/subscribers","subscription_url":"https://api.github.com/repos/runatlantis/atlantis/subscription","commits_url":"https://api.github.com/repos/runatlantis/atlantis/commits{/sha}","git_commits_url":"https://api.github.com/repos/runatlantis/atlantis/git/commits{/sha}","comments_url":"https://api.github.com/repos/runatlantis/atlantis/comments{/number}","issue_comment_url":"https://api.github.com/repos/runatlantis/atlantis/issues/comments{/number}","contents_url":"https://api.github.com/repos/runatlantis/atlantis/contents/{+path}","compare_url":"https://api.github.com/repos/runatlantis/atlantis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/runatlantis/atlantis/merges","archive_url":"https://api.github.com/repos/runatlantis/atlantis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/runatlantis/atlantis/downloads","issues_url":"https://api.github.com/repos/runatlantis/atlantis/issues{/number}","pulls_url":"https://api.github.com/repos/runatlantis/atlantis/pulls{/number}","milestones_url":"https://api.github.com/repos/runatlantis/atlantis/milestones{/number}","notifications_url":"https://api.github.com/repos/runatlantis/atlantis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/runatlantis/atlantis/labels{/name}","releases_url":"https://api.github.com/repos/runatlantis/atlantis/releases{/id}","deployments_url":"https://api.github.com/repos/runatlantis/atlantis/deployments","created_at":"2018-02-06T20:28:06Z","updated_at":"2018-05-24T12:58:01Z","pushed_at":"2018-05-23T20:55:46Z","git_url":"git://github.com/runatlantis/atlantis.git","ssh_url":"git@github.com:runatlantis/atlantis.git","clone_url":"https://github.com/runatlantis/atlantis.git","svn_url":"https://github.com/runatlantis/atlantis","homepage":"https://www.runatlantis.io","size":20975,"stargazers_count":225,"watchers_count":225,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":45,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":19,"open_issues":45,"watchers":225,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/runatlantis/atlantis/pulls/130"},"html":{"href":"https://github.com/runatlantis/atlantis/pull/130"},"issue":{"href":"https://api.github.com/repos/runatlantis/atlantis/issues/130"},"comments":{"href":"https://api.github.com/repos/runatlantis/atlantis/issues/130/comments"},"review_comments":{"href":"https://api.github.com/repos/runatlantis/atlantis/pulls/130/comments"},"review_comment":{"href":"https://api.github.com/repos/runatlantis/atlantis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/runatlantis/atlantis/pulls/130/commits"},"statuses":{"href":"https://api.github.com/repos/runatlantis/atlantis/statuses/e80120ebf4a8f29131b6bbf2b298b4e69ea39735"}},"author_association":"NONE"}}
{"actor":{"display_login":"lkysow"}}