{"action":"created","comment":{"url":"https://api.github.com/repos/theairkit/runcmd/pulls/comments/40490191","id":40490191,"diff_hunk":"@@ -23,7 +23,14 @@ func (runner *Local) Command(cmdline string) (CmdWorker, error) {\n \t\treturn nil, errors.New(\"command cannot be empty\")\n \t}\n \n-\tcommand := exec.Command(strings.Fields(cmdline)[0], strings.Fields(cmdline)[1:]...)\n+\tparser := shellwords.NewParser()\n+\tparser.ParseBacktick = true\n+\tparser.ParseEnv = false\n+\targs, err := parser.Parse(cmdline)\n+\tif err != nil {\n+\t\treturn nil, errors.New(\"cannot parse cmdline\")","path":"local.go","position":21,"original_position":21,"commit_id":"8d29a524fd3279c102915a476337a1897fd83a2b","original_commit_id":"8d29a524fd3279c102915a476337a1897fd83a2b","user":{"login":"kovetskiy","id":8445924,"avatar_url":"https://avatars.githubusercontent.com/u/8445924?v=3","gravatar_id":"","url":"https://api.github.com/users/kovetskiy","html_url":"https://github.com/kovetskiy","followers_url":"https://api.github.com/users/kovetskiy/followers","following_url":"https://api.github.com/users/kovetskiy/following{/other_user}","gists_url":"https://api.github.com/users/kovetskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/kovetskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kovetskiy/subscriptions","organizations_url":"https://api.github.com/users/kovetskiy/orgs","repos_url":"https://api.github.com/users/kovetskiy/repos","events_url":"https://api.github.com/users/kovetskiy/events{/privacy}","received_events_url":"https://api.github.com/users/kovetskiy/received_events","type":"User","site_admin":false},"body":"you should pass original error too","created_at":"2015-09-26T04:47:02Z","updated_at":"2015-09-26T04:47:02Z","html_url":"https://github.com/theairkit/runcmd/pull/8#discussion_r40490191","pull_request_url":"https://api.github.com/repos/theairkit/runcmd/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/theairkit/runcmd/pulls/comments/40490191"},"html":{"href":"https://github.com/theairkit/runcmd/pull/8#discussion_r40490191"},"pull_request":{"href":"https://api.github.com/repos/theairkit/runcmd/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/theairkit/runcmd/pulls/8","id":46043612,"html_url":"https://github.com/theairkit/runcmd/pull/8","diff_url":"https://github.com/theairkit/runcmd/pull/8.diff","patch_url":"https://github.com/theairkit/runcmd/pull/8.patch","issue_url":"https://api.github.com/repos/theairkit/runcmd/issues/8","number":8,"state":"open","locked":false,"title":"Fix quoted strings in cmdline for local runner","user":{"login":"s-kostyaev","id":8576745,"avatar_url":"https://avatars.githubusercontent.com/u/8576745?v=3","gravatar_id":"","url":"https://api.github.com/users/s-kostyaev","html_url":"https://github.com/s-kostyaev","followers_url":"https://api.github.com/users/s-kostyaev/followers","following_url":"https://api.github.com/users/s-kostyaev/following{/other_user}","gists_url":"https://api.github.com/users/s-kostyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/s-kostyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-kostyaev/subscriptions","organizations_url":"https://api.github.com/users/s-kostyaev/orgs","repos_url":"https://api.github.com/users/s-kostyaev/repos","events_url":"https://api.github.com/users/s-kostyaev/events{/privacy}","received_events_url":"https://api.github.com/users/s-kostyaev/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-25T18:37:32Z","updated_at":"2015-09-26T04:47:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfb753c62ca67f2f0dd3e0b0d85f3bfcdc3d54b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theairkit/runcmd/pulls/8/commits","review_comments_url":"https://api.github.com/repos/theairkit/runcmd/pulls/8/comments","review_comment_url":"https://api.github.com/repos/theairkit/runcmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theairkit/runcmd/issues/8/comments","statuses_url":"https://api.github.com/repos/theairkit/runcmd/statuses/8d29a524fd3279c102915a476337a1897fd83a2b","head":{"label":"s-kostyaev:master","ref":"master","sha":"8d29a524fd3279c102915a476337a1897fd83a2b","user":{"login":"s-kostyaev","id":8576745,"avatar_url":"https://avatars.githubusercontent.com/u/8576745?v=3","gravatar_id":"","url":"https://api.github.com/users/s-kostyaev","html_url":"https://github.com/s-kostyaev","followers_url":"https://api.github.com/users/s-kostyaev/followers","following_url":"https://api.github.com/users/s-kostyaev/following{/other_user}","gists_url":"https://api.github.com/users/s-kostyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/s-kostyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-kostyaev/subscriptions","organizations_url":"https://api.github.com/users/s-kostyaev/orgs","repos_url":"https://api.github.com/users/s-kostyaev/repos","events_url":"https://api.github.com/users/s-kostyaev/events{/privacy}","received_events_url":"https://api.github.com/users/s-kostyaev/received_events","type":"User","site_admin":false},"repo":{"id":43163543,"name":"runcmd","full_name":"s-kostyaev/runcmd","owner":{"login":"s-kostyaev","id":8576745,"avatar_url":"https://avatars.githubusercontent.com/u/8576745?v=3","gravatar_id":"","url":"https://api.github.com/users/s-kostyaev","html_url":"https://github.com/s-kostyaev","followers_url":"https://api.github.com/users/s-kostyaev/followers","following_url":"https://api.github.com/users/s-kostyaev/following{/other_user}","gists_url":"https://api.github.com/users/s-kostyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/s-kostyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-kostyaev/subscriptions","organizations_url":"https://api.github.com/users/s-kostyaev/orgs","repos_url":"https://api.github.com/users/s-kostyaev/repos","events_url":"https://api.github.com/users/s-kostyaev/events{/privacy}","received_events_url":"https://api.github.com/users/s-kostyaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s-kostyaev/runcmd","description":"golang package for run local/remote shell commands","fork":true,"url":"https://api.github.com/repos/s-kostyaev/runcmd","forks_url":"https://api.github.com/repos/s-kostyaev/runcmd/forks","keys_url":"https://api.github.com/repos/s-kostyaev/runcmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s-kostyaev/runcmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s-kostyaev/runcmd/teams","hooks_url":"https://api.github.com/repos/s-kostyaev/runcmd/hooks","issue_events_url":"https://api.github.com/repos/s-kostyaev/runcmd/issues/events{/number}","events_url":"https://api.github.com/repos/s-kostyaev/runcmd/events","assignees_url":"https://api.github.com/repos/s-kostyaev/runcmd/assignees{/user}","branches_url":"https://api.github.com/repos/s-kostyaev/runcmd/branches{/branch}","tags_url":"https://api.github.com/repos/s-kostyaev/runcmd/tags","blobs_url":"https://api.github.com/repos/s-kostyaev/runcmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s-kostyaev/runcmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s-kostyaev/runcmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/s-kostyaev/runcmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s-kostyaev/runcmd/statuses/{sha}","languages_url":"https://api.github.com/repos/s-kostyaev/runcmd/languages","stargazers_url":"https://api.github.com/repos/s-kostyaev/runcmd/stargazers","contributors_url":"https://api.github.com/repos/s-kostyaev/runcmd/contributors","subscribers_url":"https://api.github.com/repos/s-kostyaev/runcmd/subscribers","subscription_url":"https://api.github.com/repos/s-kostyaev/runcmd/subscription","commits_url":"https://api.github.com/repos/s-kostyaev/runcmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/s-kostyaev/runcmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/s-kostyaev/runcmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/s-kostyaev/runcmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/s-kostyaev/runcmd/contents/{+path}","compare_url":"https://api.github.com/repos/s-kostyaev/runcmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s-kostyaev/runcmd/merges","archive_url":"https://api.github.com/repos/s-kostyaev/runcmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s-kostyaev/runcmd/downloads","issues_url":"https://api.github.com/repos/s-kostyaev/runcmd/issues{/number}","pulls_url":"https://api.github.com/repos/s-kostyaev/runcmd/pulls{/number}","milestones_url":"https://api.github.com/repos/s-kostyaev/runcmd/milestones{/number}","notifications_url":"https://api.github.com/repos/s-kostyaev/runcmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s-kostyaev/runcmd/labels{/name}","releases_url":"https://api.github.com/repos/s-kostyaev/runcmd/releases{/id}","created_at":"2015-09-25T17:16:12Z","updated_at":"2015-09-25T17:16:12Z","pushed_at":"2015-09-25T18:33:14Z","git_url":"git://github.com/s-kostyaev/runcmd.git","ssh_url":"git@github.com:s-kostyaev/runcmd.git","clone_url":"https://github.com/s-kostyaev/runcmd.git","svn_url":"https://github.com/s-kostyaev/runcmd","homepage":"","size":401,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"theairkit:master","ref":"master","sha":"501e797246344b16e6b51bd3e16bf9abb454ccad","user":{"login":"theairkit","id":3401239,"avatar_url":"https://avatars.githubusercontent.com/u/3401239?v=3","gravatar_id":"","url":"https://api.github.com/users/theairkit","html_url":"https://github.com/theairkit","followers_url":"https://api.github.com/users/theairkit/followers","following_url":"https://api.github.com/users/theairkit/following{/other_user}","gists_url":"https://api.github.com/users/theairkit/gists{/gist_id}","starred_url":"https://api.github.com/users/theairkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theairkit/subscriptions","organizations_url":"https://api.github.com/users/theairkit/orgs","repos_url":"https://api.github.com/users/theairkit/repos","events_url":"https://api.github.com/users/theairkit/events{/privacy}","received_events_url":"https://api.github.com/users/theairkit/received_events","type":"User","site_admin":false},"repo":{"id":23417519,"name":"runcmd","full_name":"theairkit/runcmd","owner":{"login":"theairkit","id":3401239,"avatar_url":"https://avatars.githubusercontent.com/u/3401239?v=3","gravatar_id":"","url":"https://api.github.com/users/theairkit","html_url":"https://github.com/theairkit","followers_url":"https://api.github.com/users/theairkit/followers","following_url":"https://api.github.com/users/theairkit/following{/other_user}","gists_url":"https://api.github.com/users/theairkit/gists{/gist_id}","starred_url":"https://api.github.com/users/theairkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theairkit/subscriptions","organizations_url":"https://api.github.com/users/theairkit/orgs","repos_url":"https://api.github.com/users/theairkit/repos","events_url":"https://api.github.com/users/theairkit/events{/privacy}","received_events_url":"https://api.github.com/users/theairkit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/theairkit/runcmd","description":"golang package for run local/remote shell commands","fork":false,"url":"https://api.github.com/repos/theairkit/runcmd","forks_url":"https://api.github.com/repos/theairkit/runcmd/forks","keys_url":"https://api.github.com/repos/theairkit/runcmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theairkit/runcmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theairkit/runcmd/teams","hooks_url":"https://api.github.com/repos/theairkit/runcmd/hooks","issue_events_url":"https://api.github.com/repos/theairkit/runcmd/issues/events{/number}","events_url":"https://api.github.com/repos/theairkit/runcmd/events","assignees_url":"https://api.github.com/repos/theairkit/runcmd/assignees{/user}","branches_url":"https://api.github.com/repos/theairkit/runcmd/branches{/branch}","tags_url":"https://api.github.com/repos/theairkit/runcmd/tags","blobs_url":"https://api.github.com/repos/theairkit/runcmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theairkit/runcmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theairkit/runcmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/theairkit/runcmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theairkit/runcmd/statuses/{sha}","languages_url":"https://api.github.com/repos/theairkit/runcmd/languages","stargazers_url":"https://api.github.com/repos/theairkit/runcmd/stargazers","contributors_url":"https://api.github.com/repos/theairkit/runcmd/contributors","subscribers_url":"https://api.github.com/repos/theairkit/runcmd/subscribers","subscription_url":"https://api.github.com/repos/theairkit/runcmd/subscription","commits_url":"https://api.github.com/repos/theairkit/runcmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/theairkit/runcmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/theairkit/runcmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/theairkit/runcmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/theairkit/runcmd/contents/{+path}","compare_url":"https://api.github.com/repos/theairkit/runcmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theairkit/runcmd/merges","archive_url":"https://api.github.com/repos/theairkit/runcmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theairkit/runcmd/downloads","issues_url":"https://api.github.com/repos/theairkit/runcmd/issues{/number}","pulls_url":"https://api.github.com/repos/theairkit/runcmd/pulls{/number}","milestones_url":"https://api.github.com/repos/theairkit/runcmd/milestones{/number}","notifications_url":"https://api.github.com/repos/theairkit/runcmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theairkit/runcmd/labels{/name}","releases_url":"https://api.github.com/repos/theairkit/runcmd/releases{/id}","created_at":"2014-08-28T06:18:23Z","updated_at":"2015-09-25T17:04:07Z","pushed_at":"2015-09-25T18:37:32Z","git_url":"git://github.com/theairkit/runcmd.git","ssh_url":"git@github.com:theairkit/runcmd.git","clone_url":"https://github.com/theairkit/runcmd.git","svn_url":"https://github.com/theairkit/runcmd","homepage":"","size":401,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/theairkit/runcmd/pulls/8"},"html":{"href":"https://github.com/theairkit/runcmd/pull/8"},"issue":{"href":"https://api.github.com/repos/theairkit/runcmd/issues/8"},"comments":{"href":"https://api.github.com/repos/theairkit/runcmd/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/theairkit/runcmd/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/theairkit/runcmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theairkit/runcmd/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/theairkit/runcmd/statuses/8d29a524fd3279c102915a476337a1897fd83a2b"}}}}