{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/89897303","pull_request_review_id":10427436,"id":89897303,"diff_hunk":"@@ -168,6 +168,18 @@ def copy_mac_app\n       app_path\n     end\n \n+    # Finds the most likely candidate for this target's .app\n+    def find_app_path\n+      # guess the correct .app name from the config\n+      output_path = File.join(BuildCommandGenerator.archive_path, \"Products/Applications\", Gym.config[:output_name] + \".app\")\n+      app_path = output_path if File.exist?(output_path)","path":"gym/lib/gym/runner.rb","position":17,"original_position":17,"commit_id":"b9beb8bdf7f3b09c3ed5e4549804952abf988a40","original_commit_id":"b9beb8bdf7f3b09c3ed5e4549804952abf988a40","user":{"login":"milch","id":279407,"avatar_url":"https://avatars.githubusercontent.com/u/279407?v=3","gravatar_id":"","url":"https://api.github.com/users/milch","html_url":"https://github.com/milch","followers_url":"https://api.github.com/users/milch/followers","following_url":"https://api.github.com/users/milch/following{/other_user}","gists_url":"https://api.github.com/users/milch/gists{/gist_id}","starred_url":"https://api.github.com/users/milch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milch/subscriptions","organizations_url":"https://api.github.com/users/milch/orgs","repos_url":"https://api.github.com/users/milch/repos","events_url":"https://api.github.com/users/milch/events{/privacy}","received_events_url":"https://api.github.com/users/milch/received_events","type":"User","site_admin":false},"body":"We should show a `UI.user_error!` here if the `Gym.config[:output_name]` value is given but no file is found. Consider the following example:\r\n\r\n```bash\r\n$ gym --output_name \"TetsApp.app\" --scheme \"TestApp\" #...snip\r\n# Produces TestApp.app and HelperForTestApp.app, the command will seemingly work correctly \r\n$ gym  --output_name \"HelperForTetsApp.app\" --scheme \"TestApp\" #...snip\r\n# Produces TestApp.app and HelperForTestApp.app, the command will copy the wrong .app ... User starts pulling their hair out because they can't figure out why it works sometimes and not other times\r\n```","created_at":"2016-11-28T22:12:55Z","updated_at":"2016-11-28T22:14:01Z","html_url":"https://github.com/fastlane/fastlane/pull/7191#discussion_r89897303","pull_request_url":"https://api.github.com/repos/fastlane/fastlane/pulls/7191","_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/89897303"},"html":{"href":"https://github.com/fastlane/fastlane/pull/7191#discussion_r89897303"},"pull_request":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/7191"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/7191","id":95402384,"html_url":"https://github.com/fastlane/fastlane/pull/7191","diff_url":"https://github.com/fastlane/fastlane/pull/7191.diff","patch_url":"https://github.com/fastlane/fastlane/pull/7191.patch","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/7191","number":7191,"state":"open","locked":false,"title":"[gym] Uses `output_name` to attempt to find the correct .app package","user":{"login":"notjosh","id":33126,"avatar_url":"https://avatars.githubusercontent.com/u/33126?v=3","gravatar_id":"","url":"https://api.github.com/users/notjosh","html_url":"https://github.com/notjosh","followers_url":"https://api.github.com/users/notjosh/followers","following_url":"https://api.github.com/users/notjosh/following{/other_user}","gists_url":"https://api.github.com/users/notjosh/gists{/gist_id}","starred_url":"https://api.github.com/users/notjosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notjosh/subscriptions","organizations_url":"https://api.github.com/users/notjosh/orgs","repos_url":"https://api.github.com/users/notjosh/repos","events_url":"https://api.github.com/users/notjosh/events{/privacy}","received_events_url":"https://api.github.com/users/notjosh/received_events","type":"User","site_admin":false},"body":"Fixes #7190.\r\n\r\nI can see some circumstances where this might not be 100% the best fix, but I can't see it causing any regressions.\r\n\r\nAs a sidebar, I noticed there are two different ways this is being generated ([here](https://github.com/fastlane/fastlane/blob/11cf73824a176496b15f55902bd3c3e11435231b/gym/lib/gym/generators/package_command_generator_legacy.rb#L50-L55) and [here](https://github.com/fastlane/fastlane/blob/11cf73824a176496b15f55902bd3c3e11435231b/gym/lib/gym/runner.rb#L160) - one using `.first` and one using `.last`). I didn't bother touching the `*_legacy` (for obvious reasons), but there will potentially be inconsistencies for legacy projects (which were likely already there though, so not a big problem for this PR).\r\n\r\n---\r\n\r\nThanks for contributing to _fastlane_! Before you submit your pull request, please make sure to check the following boxes:\r\n\r\n- [x] Run `bundle exec rspec` from the subdirectory of each tool you modified. Alternatively, run `rake test_all` from the root directory.\r\n- [x] Run `bundle exec rubocop -a` to ensure the code style is valid\r\n- [x] Read the [Contribution Guidelines](https://github.com/fastlane/fastlane/blob/master/CONTRIBUTING.md)\r\n- [x] We currently don't accept new actions, please publish a plugin instead, more information in [Plugins.md](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Plugins.md)\r\n\r\nBefore submitting a pull request, we appreciate if you create an issue first to discuss the change :+1:","created_at":"2016-11-27T13:13:20Z","updated_at":"2016-11-28T22:14:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11e72f9f63c850298193a7992e65d65158c4c00a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/fastlane/pulls/7191/commits","review_comments_url":"https://api.github.com/repos/fastlane/fastlane/pulls/7191/comments","review_comment_url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/7191/comments","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/b9beb8bdf7f3b09c3ed5e4549804952abf988a40","head":{"label":"notjosh:oh-you-mean-that-app-okay-fine","ref":"oh-you-mean-that-app-okay-fine","sha":"b9beb8bdf7f3b09c3ed5e4549804952abf988a40","user":{"login":"notjosh","id":33126,"avatar_url":"https://avatars.githubusercontent.com/u/33126?v=3","gravatar_id":"","url":"https://api.github.com/users/notjosh","html_url":"https://github.com/notjosh","followers_url":"https://api.github.com/users/notjosh/followers","following_url":"https://api.github.com/users/notjosh/following{/other_user}","gists_url":"https://api.github.com/users/notjosh/gists{/gist_id}","starred_url":"https://api.github.com/users/notjosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notjosh/subscriptions","organizations_url":"https://api.github.com/users/notjosh/orgs","repos_url":"https://api.github.com/users/notjosh/repos","events_url":"https://api.github.com/users/notjosh/events{/privacy}","received_events_url":"https://api.github.com/users/notjosh/received_events","type":"User","site_admin":false},"repo":{"id":74887981,"name":"fastlane","full_name":"notjosh/fastlane","owner":{"login":"notjosh","id":33126,"avatar_url":"https://avatars.githubusercontent.com/u/33126?v=3","gravatar_id":"","url":"https://api.github.com/users/notjosh","html_url":"https://github.com/notjosh","followers_url":"https://api.github.com/users/notjosh/followers","following_url":"https://api.github.com/users/notjosh/following{/other_user}","gists_url":"https://api.github.com/users/notjosh/gists{/gist_id}","starred_url":"https://api.github.com/users/notjosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notjosh/subscriptions","organizations_url":"https://api.github.com/users/notjosh/orgs","repos_url":"https://api.github.com/users/notjosh/repos","events_url":"https://api.github.com/users/notjosh/events{/privacy}","received_events_url":"https://api.github.com/users/notjosh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/notjosh/fastlane","description":"The easiest way to automate building and releasing your iOS and Android apps","fork":true,"url":"https://api.github.com/repos/notjosh/fastlane","forks_url":"https://api.github.com/repos/notjosh/fastlane/forks","keys_url":"https://api.github.com/repos/notjosh/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/notjosh/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/notjosh/fastlane/teams","hooks_url":"https://api.github.com/repos/notjosh/fastlane/hooks","issue_events_url":"https://api.github.com/repos/notjosh/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/notjosh/fastlane/events","assignees_url":"https://api.github.com/repos/notjosh/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/notjosh/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/notjosh/fastlane/tags","blobs_url":"https://api.github.com/repos/notjosh/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/notjosh/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/notjosh/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/notjosh/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/notjosh/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/notjosh/fastlane/languages","stargazers_url":"https://api.github.com/repos/notjosh/fastlane/stargazers","contributors_url":"https://api.github.com/repos/notjosh/fastlane/contributors","subscribers_url":"https://api.github.com/repos/notjosh/fastlane/subscribers","subscription_url":"https://api.github.com/repos/notjosh/fastlane/subscription","commits_url":"https://api.github.com/repos/notjosh/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/notjosh/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/notjosh/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/notjosh/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/notjosh/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/notjosh/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/notjosh/fastlane/merges","archive_url":"https://api.github.com/repos/notjosh/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/notjosh/fastlane/downloads","issues_url":"https://api.github.com/repos/notjosh/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/notjosh/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/notjosh/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/notjosh/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/notjosh/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/notjosh/fastlane/releases{/id}","deployments_url":"https://api.github.com/repos/notjosh/fastlane/deployments","created_at":"2016-11-27T13:02:37Z","updated_at":"2016-11-27T13:02:46Z","pushed_at":"2016-11-27T13:13:35Z","git_url":"git://github.com/notjosh/fastlane.git","ssh_url":"git@github.com:notjosh/fastlane.git","clone_url":"https://github.com/notjosh/fastlane.git","svn_url":"https://github.com/notjosh/fastlane","homepage":"https://fastlane.tools","size":53378,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fastlane:master","ref":"master","sha":"11cf73824a176496b15f55902bd3c3e11435231b","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":27442967,"name":"fastlane","full_name":"fastlane/fastlane","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/fastlane","description":"The easiest way to automate building and releasing your iOS and Android apps","fork":false,"url":"https://api.github.com/repos/fastlane/fastlane","forks_url":"https://api.github.com/repos/fastlane/fastlane/forks","keys_url":"https://api.github.com/repos/fastlane/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/fastlane/teams","hooks_url":"https://api.github.com/repos/fastlane/fastlane/hooks","issue_events_url":"https://api.github.com/repos/fastlane/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/fastlane/events","assignees_url":"https://api.github.com/repos/fastlane/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/fastlane/tags","blobs_url":"https://api.github.com/repos/fastlane/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/fastlane/languages","stargazers_url":"https://api.github.com/repos/fastlane/fastlane/stargazers","contributors_url":"https://api.github.com/repos/fastlane/fastlane/contributors","subscribers_url":"https://api.github.com/repos/fastlane/fastlane/subscribers","subscription_url":"https://api.github.com/repos/fastlane/fastlane/subscription","commits_url":"https://api.github.com/repos/fastlane/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/fastlane/merges","archive_url":"https://api.github.com/repos/fastlane/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/fastlane/downloads","issues_url":"https://api.github.com/repos/fastlane/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/fastlane/releases{/id}","deployments_url":"https://api.github.com/repos/fastlane/fastlane/deployments","created_at":"2014-12-02T17:00:38Z","updated_at":"2016-11-28T17:52:30Z","pushed_at":"2016-11-28T22:10:20Z","git_url":"git://github.com/fastlane/fastlane.git","ssh_url":"git@github.com:fastlane/fastlane.git","clone_url":"https://github.com/fastlane/fastlane.git","svn_url":"https://github.com/fastlane/fastlane","homepage":"https://fastlane.tools","size":65805,"stargazers_count":12540,"watchers_count":12540,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1889,"mirror_url":null,"open_issues_count":387,"forks":1889,"open_issues":387,"watchers":12540,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/7191"},"html":{"href":"https://github.com/fastlane/fastlane/pull/7191"},"issue":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/7191"},"comments":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/7191/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/7191/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/7191/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/fastlane/statuses/b9beb8bdf7f3b09c3ed5e4549804952abf988a40"}}}}
{"actor":{"display_login":"milch"}}