{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/comments/207962254","pull_request_review_id":143678979,"id":207962254,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzk2MjI1NA==","diff_hunk":"@@ -98,15 +103,31 @@ func (s *snapExecSuite) TestFindCommand(c *C) {\n \tinfo, err := snap.InfoFromSnapYaml(mockYaml)\n \tc.Assert(err, IsNil)\n \n+\tsnapPath := fmt.Sprintf(\"%s/snapname/unset\", dirs.SnapMountDir)\n+\n \tfor _, t := range []struct {\n-\t\tcmd      string\n-\t\texpected string\n+\t\tapp          string\n+\t\tcmd          string\n+\t\tincludeChain bool\n+\t\texpected     string\n \t}{\n-\t\t{cmd: \"\", expected: `run-app cmd-arg1 $SNAP_DATA`},\n-\t\t{cmd: \"stop\", expected: \"stop-app\"},\n-\t\t{cmd: \"post-stop\", expected: \"post-stop-app\"},\n+\t\t// With command chain\n+\t\t{app: \"app\", cmd: \"\", includeChain: false, expected: fmt.Sprintf(\"%s/run-app cmd-arg1 $SNAP_DATA\", snapPath)},\n+\t\t{app: \"app2\", cmd: \"\", includeChain: false, expected: fmt.Sprintf(\"%[1]s/chain1 %[1]s/chain2 %[1]s/run-app2\", snapPath)},","path":"cmd/snap-exec/main_test.go","position":null,"original_position":31,"commit_id":"7e7bd1c09f7c0d6c69274034337e97dc8720d4e5","original_commit_id":"2334f72321cd971bc9540e26694a146b46f8839a","user":{"login":"kyrofa","id":946674,"node_id":"MDQ6VXNlcjk0NjY3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/946674?v=4","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"body":"Haha, no strong feelings here, I just added the duplication to get rid of the ugly syntax.","created_at":"2018-08-06T17:00:59Z","updated_at":"2018-08-06T17:01:00Z","html_url":"https://github.com/snapcore/snapd/pull/5569#discussion_r207962254","pull_request_url":"https://api.github.com/repos/snapcore/snapd/pulls/5569","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments/207962254"},"html":{"href":"https://github.com/snapcore/snapd/pull/5569#discussion_r207962254"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/5569"}},"in_reply_to_id":207805612},"pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/5569","id":204478362,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NDc4MzYy","html_url":"https://github.com/snapcore/snapd/pull/5569","diff_url":"https://github.com/snapcore/snapd/pull/5569.diff","patch_url":"https://github.com/snapcore/snapd/pull/5569.patch","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/5569","number":5569,"state":"open","locked":false,"title":"snap,snap-exec: support command-chain for app","user":{"login":"kyrofa","id":946674,"node_id":"MDQ6VXNlcjk0NjY3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/946674?v=4","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"body":"When a snap is created by the snapcraft CLI, each app has an associated chunk of environment variables defined as well as scripts that may be run before the app's command. Currently, this is done by generating a shell script wrapper for each app, but this is opaque and confusing, and makes `snap run --shell` not actually provide a representative environment for the app.\r\n\r\nSnapd supports an `environment` keyword for apps and hooks, but the last item needed before the shell wrappers can go away is the ability to run scripts before the app command. Add support for this to apps. Hook support will be a follow-up.\r\n\r\nSee forum topic https://forum.snapcraft.io/t/6112 for more details.","created_at":"2018-07-27T16:19:55Z","updated_at":"2018-08-06T17:01:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6198a7b69c4e5a284968f0d933a9513d4577e70","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/snapcore/snapd/pulls/5569/commits","review_comments_url":"https://api.github.com/repos/snapcore/snapd/pulls/5569/comments","review_comment_url":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/5569/comments","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/7e7bd1c09f7c0d6c69274034337e97dc8720d4e5","head":{"label":"kyrofa:feature/command_chain","ref":"feature/command_chain","sha":"7e7bd1c09f7c0d6c69274034337e97dc8720d4e5","user":{"login":"kyrofa","id":946674,"node_id":"MDQ6VXNlcjk0NjY3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/946674?v=4","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"repo":{"id":59755219,"node_id":"MDEwOlJlcG9zaXRvcnk1OTc1NTIxOQ==","name":"snapd","full_name":"kyrofa/snapd","owner":{"login":"kyrofa","id":946674,"node_id":"MDQ6VXNlcjk0NjY3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/946674?v=4","gravatar_id":"","url":"https://api.github.com/users/kyrofa","html_url":"https://github.com/kyrofa","followers_url":"https://api.github.com/users/kyrofa/followers","following_url":"https://api.github.com/users/kyrofa/following{/other_user}","gists_url":"https://api.github.com/users/kyrofa/gists{/gist_id}","starred_url":"https://api.github.com/users/kyrofa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyrofa/subscriptions","organizations_url":"https://api.github.com/users/kyrofa/orgs","repos_url":"https://api.github.com/users/kyrofa/repos","events_url":"https://api.github.com/users/kyrofa/events{/privacy}","received_events_url":"https://api.github.com/users/kyrofa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kyrofa/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":true,"url":"https://api.github.com/repos/kyrofa/snapd","forks_url":"https://api.github.com/repos/kyrofa/snapd/forks","keys_url":"https://api.github.com/repos/kyrofa/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kyrofa/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kyrofa/snapd/teams","hooks_url":"https://api.github.com/repos/kyrofa/snapd/hooks","issue_events_url":"https://api.github.com/repos/kyrofa/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/kyrofa/snapd/events","assignees_url":"https://api.github.com/repos/kyrofa/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/kyrofa/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/kyrofa/snapd/tags","blobs_url":"https://api.github.com/repos/kyrofa/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kyrofa/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kyrofa/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/kyrofa/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kyrofa/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/kyrofa/snapd/languages","stargazers_url":"https://api.github.com/repos/kyrofa/snapd/stargazers","contributors_url":"https://api.github.com/repos/kyrofa/snapd/contributors","subscribers_url":"https://api.github.com/repos/kyrofa/snapd/subscribers","subscription_url":"https://api.github.com/repos/kyrofa/snapd/subscription","commits_url":"https://api.github.com/repos/kyrofa/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/kyrofa/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/kyrofa/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/kyrofa/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/kyrofa/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/kyrofa/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kyrofa/snapd/merges","archive_url":"https://api.github.com/repos/kyrofa/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kyrofa/snapd/downloads","issues_url":"https://api.github.com/repos/kyrofa/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/kyrofa/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/kyrofa/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/kyrofa/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kyrofa/snapd/labels{/name}","releases_url":"https://api.github.com/repos/kyrofa/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/kyrofa/snapd/deployments","created_at":"2016-05-26T14:05:43Z","updated_at":"2018-07-11T22:14:16Z","pushed_at":"2018-08-06T17:00:22Z","git_url":"git://github.com/kyrofa/snapd.git","ssh_url":"git@github.com:kyrofa/snapd.git","clone_url":"https://github.com/kyrofa/snapd.git","svn_url":"https://github.com/kyrofa/snapd","homepage":"","size":68767,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"snapcore:master","ref":"master","sha":"60e22b10837bda836f60109f1a1995cea525d2e4","user":{"login":"snapcore","id":19532717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTMyNzE3","avatar_url":"https://avatars1.githubusercontent.com/u/19532717?v=4","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"node_id":"MDEwOlJlcG9zaXRvcnk0NDY3Mjc0NA==","name":"snapd","full_name":"snapcore/snapd","owner":{"login":"snapcore","id":19532717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTMyNzE3","avatar_url":"https://avatars1.githubusercontent.com/u/19532717?v=4","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":false,"url":"https://api.github.com/repos/snapcore/snapd","forks_url":"https://api.github.com/repos/snapcore/snapd/forks","keys_url":"https://api.github.com/repos/snapcore/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snapd/teams","hooks_url":"https://api.github.com/repos/snapcore/snapd/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snapd/events","assignees_url":"https://api.github.com/repos/snapcore/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snapd/tags","blobs_url":"https://api.github.com/repos/snapcore/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snapd/languages","stargazers_url":"https://api.github.com/repos/snapcore/snapd/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snapd/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snapd/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snapd/subscription","commits_url":"https://api.github.com/repos/snapcore/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snapd/merges","archive_url":"https://api.github.com/repos/snapcore/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snapd/downloads","issues_url":"https://api.github.com/repos/snapcore/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snapd/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snapd/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2018-08-06T09:21:33Z","pushed_at":"2018-08-06T17:00:24Z","git_url":"git://github.com/snapcore/snapd.git","ssh_url":"git@github.com:snapcore/snapd.git","clone_url":"https://github.com/snapcore/snapd.git","svn_url":"https://github.com/snapcore/snapd","homepage":"","size":68991,"stargazers_count":980,"watchers_count":980,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":243,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":243,"open_issues":36,"watchers":980,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/5569"},"html":{"href":"https://github.com/snapcore/snapd/pull/5569"},"issue":{"href":"https://api.github.com/repos/snapcore/snapd/issues/5569"},"comments":{"href":"https://api.github.com/repos/snapcore/snapd/issues/5569/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/5569/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/5569/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snapd/statuses/7e7bd1c09f7c0d6c69274034337e97dc8720d4e5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kyrofa"}}