{"action":"created","comment":{"url":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/comments/209060342","pull_request_review_id":145002748,"id":209060342,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTA2MDM0Mg==","diff_hunk":"@@ -109,12 +109,12 @@ function CleanupSimulator() {\n   xcrun simctl delete \"$1\"\n }\n \n-trap \"CleanupSimulator ${TEST_DEVICE_ID}\" EXIT\n-\n readonly STD_REDIRECT_DYLIB=\"$PWD/%std_redirect_dylib_path%\"\n \n readonly TEMP_DIR=$(mktemp -d \"${TMPDIR:-/tmp}/bazel_temp.XXXXXX\")\n-trap 'rm -rf \"${TEMP_DIR}\"' ERR EXIT\n+\n+trap 'rm -rf \"${TEMP_DIR}\"' ERR\n+trap 'rm -rf \"${TEMP_DIR}\" && CleanupSimulator ${TEST_DEVICE_ID}' EXIT","path":"apple/bundling/runners/ios_sim.template.sh","position":12,"original_position":12,"commit_id":"1ac42611f9a93bf49c680e1ad23dd5f1c9d9bc2d","original_commit_id":"1ac42611f9a93bf49c680e1ad23dd5f1c9d9bc2d","user":{"login":"kastiglione","id":43429,"node_id":"MDQ6VXNlcjQzNDI5","avatar_url":"https://avatars0.githubusercontent.com/u/43429?v=4","gravatar_id":"","url":"https://api.github.com/users/kastiglione","html_url":"https://github.com/kastiglione","followers_url":"https://api.github.com/users/kastiglione/followers","following_url":"https://api.github.com/users/kastiglione/following{/other_user}","gists_url":"https://api.github.com/users/kastiglione/gists{/gist_id}","starred_url":"https://api.github.com/users/kastiglione/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kastiglione/subscriptions","organizations_url":"https://api.github.com/users/kastiglione/orgs","repos_url":"https://api.github.com/users/kastiglione/repos","events_url":"https://api.github.com/users/kastiglione/events{/privacy}","received_events_url":"https://api.github.com/users/kastiglione/received_events","type":"User","site_admin":false},"body":"Alternatively, both `ERR` and `EXIT` should do both cleanups.","created_at":"2018-08-09T20:01:59Z","updated_at":"2018-08-09T20:01:59Z","html_url":"https://github.com/bazelbuild/rules_apple/pull/201#discussion_r209060342","pull_request_url":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/201","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/comments/209060342"},"html":{"href":"https://github.com/bazelbuild/rules_apple/pull/201#discussion_r209060342"},"pull_request":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/201"}}},"pull_request":{"url":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/201","id":206871692,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2ODcxNjky","html_url":"https://github.com/bazelbuild/rules_apple/pull/201","diff_url":"https://github.com/bazelbuild/rules_apple/pull/201.diff","patch_url":"https://github.com/bazelbuild/rules_apple/pull/201.patch","issue_url":"https://api.github.com/repos/bazelbuild/rules_apple/issues/201","number":201,"state":"open","locked":false,"title":"Actually delete temporary simulator after use","user":{"login":"kastiglione","id":43429,"node_id":"MDQ6VXNlcjQzNDI5","avatar_url":"https://avatars0.githubusercontent.com/u/43429?v=4","gravatar_id":"","url":"https://api.github.com/users/kastiglione","html_url":"https://github.com/kastiglione","followers_url":"https://api.github.com/users/kastiglione/followers","following_url":"https://api.github.com/users/kastiglione/following{/other_user}","gists_url":"https://api.github.com/users/kastiglione/gists{/gist_id}","starred_url":"https://api.github.com/users/kastiglione/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kastiglione/subscriptions","organizations_url":"https://api.github.com/users/kastiglione/orgs","repos_url":"https://api.github.com/users/kastiglione/repos","events_url":"https://api.github.com/users/kastiglione/events{/privacy}","received_events_url":"https://api.github.com/users/kastiglione/received_events","type":"User","site_admin":false},"body":"A simulator is created for each test run, but is not deleted as expected after completion. This is happening because an `EXIT` trap is specified twice, with the second (cleanup for `$TEMP_DIR`) overwriting the first (cleanup of the temporary simulator).\r\n\r\nThis change combines the two cleanups into a single trap command.","created_at":"2018-08-08T01:52:24Z","updated_at":"2018-08-09T20:01:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2f1f9296a95c863338ae8b155ed0bbc9658fac6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":881595077,"node_id":"MDU6TGFiZWw4ODE1OTUwNzc=","url":"https://api.github.com/repos/bazelbuild/rules_apple/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/201/commits","review_comments_url":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/201/comments","review_comment_url":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bazelbuild/rules_apple/issues/201/comments","statuses_url":"https://api.github.com/repos/bazelbuild/rules_apple/statuses/1ac42611f9a93bf49c680e1ad23dd5f1c9d9bc2d","head":{"label":"kastiglione:patch-1","ref":"patch-1","sha":"1ac42611f9a93bf49c680e1ad23dd5f1c9d9bc2d","user":{"login":"kastiglione","id":43429,"node_id":"MDQ6VXNlcjQzNDI5","avatar_url":"https://avatars0.githubusercontent.com/u/43429?v=4","gravatar_id":"","url":"https://api.github.com/users/kastiglione","html_url":"https://github.com/kastiglione","followers_url":"https://api.github.com/users/kastiglione/followers","following_url":"https://api.github.com/users/kastiglione/following{/other_user}","gists_url":"https://api.github.com/users/kastiglione/gists{/gist_id}","starred_url":"https://api.github.com/users/kastiglione/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kastiglione/subscriptions","organizations_url":"https://api.github.com/users/kastiglione/orgs","repos_url":"https://api.github.com/users/kastiglione/repos","events_url":"https://api.github.com/users/kastiglione/events{/privacy}","received_events_url":"https://api.github.com/users/kastiglione/received_events","type":"User","site_admin":false},"repo":{"id":143946360,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM5NDYzNjA=","name":"rules_apple","full_name":"kastiglione/rules_apple","owner":{"login":"kastiglione","id":43429,"node_id":"MDQ6VXNlcjQzNDI5","avatar_url":"https://avatars0.githubusercontent.com/u/43429?v=4","gravatar_id":"","url":"https://api.github.com/users/kastiglione","html_url":"https://github.com/kastiglione","followers_url":"https://api.github.com/users/kastiglione/followers","following_url":"https://api.github.com/users/kastiglione/following{/other_user}","gists_url":"https://api.github.com/users/kastiglione/gists{/gist_id}","starred_url":"https://api.github.com/users/kastiglione/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kastiglione/subscriptions","organizations_url":"https://api.github.com/users/kastiglione/orgs","repos_url":"https://api.github.com/users/kastiglione/repos","events_url":"https://api.github.com/users/kastiglione/events{/privacy}","received_events_url":"https://api.github.com/users/kastiglione/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kastiglione/rules_apple","description":"Bazel rules to build apps for Apple platforms.","fork":true,"url":"https://api.github.com/repos/kastiglione/rules_apple","forks_url":"https://api.github.com/repos/kastiglione/rules_apple/forks","keys_url":"https://api.github.com/repos/kastiglione/rules_apple/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kastiglione/rules_apple/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kastiglione/rules_apple/teams","hooks_url":"https://api.github.com/repos/kastiglione/rules_apple/hooks","issue_events_url":"https://api.github.com/repos/kastiglione/rules_apple/issues/events{/number}","events_url":"https://api.github.com/repos/kastiglione/rules_apple/events","assignees_url":"https://api.github.com/repos/kastiglione/rules_apple/assignees{/user}","branches_url":"https://api.github.com/repos/kastiglione/rules_apple/branches{/branch}","tags_url":"https://api.github.com/repos/kastiglione/rules_apple/tags","blobs_url":"https://api.github.com/repos/kastiglione/rules_apple/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kastiglione/rules_apple/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kastiglione/rules_apple/git/refs{/sha}","trees_url":"https://api.github.com/repos/kastiglione/rules_apple/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kastiglione/rules_apple/statuses/{sha}","languages_url":"https://api.github.com/repos/kastiglione/rules_apple/languages","stargazers_url":"https://api.github.com/repos/kastiglione/rules_apple/stargazers","contributors_url":"https://api.github.com/repos/kastiglione/rules_apple/contributors","subscribers_url":"https://api.github.com/repos/kastiglione/rules_apple/subscribers","subscription_url":"https://api.github.com/repos/kastiglione/rules_apple/subscription","commits_url":"https://api.github.com/repos/kastiglione/rules_apple/commits{/sha}","git_commits_url":"https://api.github.com/repos/kastiglione/rules_apple/git/commits{/sha}","comments_url":"https://api.github.com/repos/kastiglione/rules_apple/comments{/number}","issue_comment_url":"https://api.github.com/repos/kastiglione/rules_apple/issues/comments{/number}","contents_url":"https://api.github.com/repos/kastiglione/rules_apple/contents/{+path}","compare_url":"https://api.github.com/repos/kastiglione/rules_apple/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kastiglione/rules_apple/merges","archive_url":"https://api.github.com/repos/kastiglione/rules_apple/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kastiglione/rules_apple/downloads","issues_url":"https://api.github.com/repos/kastiglione/rules_apple/issues{/number}","pulls_url":"https://api.github.com/repos/kastiglione/rules_apple/pulls{/number}","milestones_url":"https://api.github.com/repos/kastiglione/rules_apple/milestones{/number}","notifications_url":"https://api.github.com/repos/kastiglione/rules_apple/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kastiglione/rules_apple/labels{/name}","releases_url":"https://api.github.com/repos/kastiglione/rules_apple/releases{/id}","deployments_url":"https://api.github.com/repos/kastiglione/rules_apple/deployments","created_at":"2018-08-08T01:43:51Z","updated_at":"2018-08-08T01:43:53Z","pushed_at":"2018-08-08T01:48:59Z","git_url":"git://github.com/kastiglione/rules_apple.git","ssh_url":"git@github.com:kastiglione/rules_apple.git","clone_url":"https://github.com/kastiglione/rules_apple.git","svn_url":"https://github.com/kastiglione/rules_apple","homepage":"","size":2282,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bazelbuild:master","ref":"master","sha":"3745c3f03b9d29a04671fd4fac96468ca7031fd6","user":{"login":"bazelbuild","id":11684617,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjg0NjE3","avatar_url":"https://avatars1.githubusercontent.com/u/11684617?v=4","gravatar_id":"","url":"https://api.github.com/users/bazelbuild","html_url":"https://github.com/bazelbuild","followers_url":"https://api.github.com/users/bazelbuild/followers","following_url":"https://api.github.com/users/bazelbuild/following{/other_user}","gists_url":"https://api.github.com/users/bazelbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/bazelbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bazelbuild/subscriptions","organizations_url":"https://api.github.com/users/bazelbuild/orgs","repos_url":"https://api.github.com/users/bazelbuild/repos","events_url":"https://api.github.com/users/bazelbuild/events{/privacy}","received_events_url":"https://api.github.com/users/bazelbuild/received_events","type":"Organization","site_admin":false},"repo":{"id":86610729,"node_id":"MDEwOlJlcG9zaXRvcnk4NjYxMDcyOQ==","name":"rules_apple","full_name":"bazelbuild/rules_apple","owner":{"login":"bazelbuild","id":11684617,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjg0NjE3","avatar_url":"https://avatars1.githubusercontent.com/u/11684617?v=4","gravatar_id":"","url":"https://api.github.com/users/bazelbuild","html_url":"https://github.com/bazelbuild","followers_url":"https://api.github.com/users/bazelbuild/followers","following_url":"https://api.github.com/users/bazelbuild/following{/other_user}","gists_url":"https://api.github.com/users/bazelbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/bazelbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bazelbuild/subscriptions","organizations_url":"https://api.github.com/users/bazelbuild/orgs","repos_url":"https://api.github.com/users/bazelbuild/repos","events_url":"https://api.github.com/users/bazelbuild/events{/privacy}","received_events_url":"https://api.github.com/users/bazelbuild/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bazelbuild/rules_apple","description":"Bazel rules to build apps for Apple platforms.","fork":false,"url":"https://api.github.com/repos/bazelbuild/rules_apple","forks_url":"https://api.github.com/repos/bazelbuild/rules_apple/forks","keys_url":"https://api.github.com/repos/bazelbuild/rules_apple/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bazelbuild/rules_apple/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bazelbuild/rules_apple/teams","hooks_url":"https://api.github.com/repos/bazelbuild/rules_apple/hooks","issue_events_url":"https://api.github.com/repos/bazelbuild/rules_apple/issues/events{/number}","events_url":"https://api.github.com/repos/bazelbuild/rules_apple/events","assignees_url":"https://api.github.com/repos/bazelbuild/rules_apple/assignees{/user}","branches_url":"https://api.github.com/repos/bazelbuild/rules_apple/branches{/branch}","tags_url":"https://api.github.com/repos/bazelbuild/rules_apple/tags","blobs_url":"https://api.github.com/repos/bazelbuild/rules_apple/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bazelbuild/rules_apple/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bazelbuild/rules_apple/git/refs{/sha}","trees_url":"https://api.github.com/repos/bazelbuild/rules_apple/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bazelbuild/rules_apple/statuses/{sha}","languages_url":"https://api.github.com/repos/bazelbuild/rules_apple/languages","stargazers_url":"https://api.github.com/repos/bazelbuild/rules_apple/stargazers","contributors_url":"https://api.github.com/repos/bazelbuild/rules_apple/contributors","subscribers_url":"https://api.github.com/repos/bazelbuild/rules_apple/subscribers","subscription_url":"https://api.github.com/repos/bazelbuild/rules_apple/subscription","commits_url":"https://api.github.com/repos/bazelbuild/rules_apple/commits{/sha}","git_commits_url":"https://api.github.com/repos/bazelbuild/rules_apple/git/commits{/sha}","comments_url":"https://api.github.com/repos/bazelbuild/rules_apple/comments{/number}","issue_comment_url":"https://api.github.com/repos/bazelbuild/rules_apple/issues/comments{/number}","contents_url":"https://api.github.com/repos/bazelbuild/rules_apple/contents/{+path}","compare_url":"https://api.github.com/repos/bazelbuild/rules_apple/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bazelbuild/rules_apple/merges","archive_url":"https://api.github.com/repos/bazelbuild/rules_apple/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bazelbuild/rules_apple/downloads","issues_url":"https://api.github.com/repos/bazelbuild/rules_apple/issues{/number}","pulls_url":"https://api.github.com/repos/bazelbuild/rules_apple/pulls{/number}","milestones_url":"https://api.github.com/repos/bazelbuild/rules_apple/milestones{/number}","notifications_url":"https://api.github.com/repos/bazelbuild/rules_apple/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bazelbuild/rules_apple/labels{/name}","releases_url":"https://api.github.com/repos/bazelbuild/rules_apple/releases{/id}","deployments_url":"https://api.github.com/repos/bazelbuild/rules_apple/deployments","created_at":"2017-03-29T17:30:02Z","updated_at":"2018-08-08T23:31:08Z","pushed_at":"2018-08-08T23:31:05Z","git_url":"git://github.com/bazelbuild/rules_apple.git","ssh_url":"git@github.com:bazelbuild/rules_apple.git","clone_url":"https://github.com/bazelbuild/rules_apple.git","svn_url":"https://github.com/bazelbuild/rules_apple","homepage":"","size":2289,"stargazers_count":51,"watchers_count":51,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":37,"open_issues":36,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/201"},"html":{"href":"https://github.com/bazelbuild/rules_apple/pull/201"},"issue":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/issues/201"},"comments":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/issues/201/comments"},"review_comments":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/201/comments"},"review_comment":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/pulls/201/commits"},"statuses":{"href":"https://api.github.com/repos/bazelbuild/rules_apple/statuses/1ac42611f9a93bf49c680e1ad23dd5f1c9d9bc2d"}},"author_association":"NONE"}}
{"actor":{"display_login":"kastiglione"}}