{"action":"created","comment":{"url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/comments/44024997","id":44024997,"diff_hunk":"@@ -59,16 +62,22 @@ func NewUDF(cli cli.Commander) *UDF {\n \n // Create makes the required call to UDF to\n func (u *UDF) Create(release, channel, arch string, ver int) (path string, err error) {\n-\ttmpDirName, _ := u.cli.ExecCommand(\"mktemp -d\")\n-\ttmpFileName := filepath.Join(tmpDirName, outputFileName)\n+\ttmpDirName, err := u.cli.ExecCommand(\"mktemp\", \"-d\")\n+\tif err != nil {\n+\t\treturn\n+\t}\n+\ttmpFileName := filepath.Join(strings.TrimSpace(tmpDirName), outputFileName)","path":"pkg/image/image.go","position":20,"original_position":20,"commit_id":"95e312e85b18517874a1ccf76d89d32a972467f3","original_commit_id":"95e312e85b18517874a1ccf76d89d32a972467f3","user":{"login":"elopio","id":617831,"avatar_url":"https://avatars.githubusercontent.com/u/617831?v=3","gravatar_id":"","url":"https://api.github.com/users/elopio","html_url":"https://github.com/elopio","followers_url":"https://api.github.com/users/elopio/followers","following_url":"https://api.github.com/users/elopio/following{/other_user}","gists_url":"https://api.github.com/users/elopio/gists{/gist_id}","starred_url":"https://api.github.com/users/elopio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elopio/subscriptions","organizations_url":"https://api.github.com/users/elopio/orgs","repos_url":"https://api.github.com/users/elopio/repos","events_url":"https://api.github.com/users/elopio/events{/privacy}","received_events_url":"https://api.github.com/users/elopio/received_events","type":"User","site_admin":false},"body":"is it possible for mktemp to return spaces? Not sure why are you trimming here.","created_at":"2015-11-05T15:34:15Z","updated_at":"2015-11-05T15:34:15Z","html_url":"https://github.com/ubuntu-core/snappy-cloud-image/pull/22#discussion_r44024997","pull_request_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/comments/44024997"},"html":{"href":"https://github.com/ubuntu-core/snappy-cloud-image/pull/22#discussion_r44024997"},"pull_request":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/22","id":49715531,"html_url":"https://github.com/ubuntu-core/snappy-cloud-image/pull/22","diff_url":"https://github.com/ubuntu-core/snappy-cloud-image/pull/22.diff","patch_url":"https://github.com/ubuntu-core/snappy-cloud-image/pull/22.patch","issue_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues/22","number":22,"state":"open","locked":false,"title":"Build and runtime fixes","user":{"login":"fgimenez","id":70376,"avatar_url":"https://avatars.githubusercontent.com/u/70376?v=3","gravatar_id":"","url":"https://api.github.com/users/fgimenez","html_url":"https://github.com/fgimenez","followers_url":"https://api.github.com/users/fgimenez/followers","following_url":"https://api.github.com/users/fgimenez/following{/other_user}","gists_url":"https://api.github.com/users/fgimenez/gists{/gist_id}","starred_url":"https://api.github.com/users/fgimenez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgimenez/subscriptions","organizations_url":"https://api.github.com/users/fgimenez/orgs","repos_url":"https://api.github.com/users/fgimenez/repos","events_url":"https://api.github.com/users/fgimenez/events{/privacy}","received_events_url":"https://api.github.com/users/fgimenez/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-04T17:00:15Z","updated_at":"2015-11-05T15:34:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c47f1b39a1105e588f9783195b948ff317aae4a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/22/commits","review_comments_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/22/comments","review_comment_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues/22/comments","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/statuses/95e312e85b18517874a1ccf76d89d32a972467f3","head":{"label":"ubuntu-core:build-and-runtime-fixes","ref":"build-and-runtime-fixes","sha":"95e312e85b18517874a1ccf76d89d32a972467f3","user":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"repo":{"id":44530774,"name":"snappy-cloud-image","full_name":"ubuntu-core/snappy-cloud-image","owner":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubuntu-core/snappy-cloud-image","description":"","fork":false,"url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image","forks_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/forks","keys_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/teams","hooks_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/hooks","issue_events_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues/events{/number}","events_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/events","assignees_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/assignees{/user}","branches_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/branches{/branch}","tags_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/tags","blobs_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/statuses/{sha}","languages_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/languages","stargazers_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/stargazers","contributors_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/contributors","subscribers_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/subscribers","subscription_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/subscription","commits_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/contents/{+path}","compare_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/merges","archive_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/downloads","issues_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues{/number}","pulls_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls{/number}","milestones_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/milestones{/number}","notifications_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/labels{/name}","releases_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/releases{/id}","created_at":"2015-10-19T11:43:31Z","updated_at":"2015-10-29T15:21:05Z","pushed_at":"2015-11-04T17:00:15Z","git_url":"git://github.com/ubuntu-core/snappy-cloud-image.git","ssh_url":"git@github.com:ubuntu-core/snappy-cloud-image.git","clone_url":"https://github.com/ubuntu-core/snappy-cloud-image.git","svn_url":"https://github.com/ubuntu-core/snappy-cloud-image","homepage":null,"size":1679,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ubuntu-core:master","ref":"master","sha":"25f624ce1d606b466cbf2a485d6a0f1c50d8e121","user":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"repo":{"id":44530774,"name":"snappy-cloud-image","full_name":"ubuntu-core/snappy-cloud-image","owner":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubuntu-core/snappy-cloud-image","description":"","fork":false,"url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image","forks_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/forks","keys_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/teams","hooks_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/hooks","issue_events_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues/events{/number}","events_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/events","assignees_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/assignees{/user}","branches_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/branches{/branch}","tags_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/tags","blobs_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/statuses/{sha}","languages_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/languages","stargazers_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/stargazers","contributors_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/contributors","subscribers_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/subscribers","subscription_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/subscription","commits_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/contents/{+path}","compare_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/merges","archive_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/downloads","issues_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues{/number}","pulls_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls{/number}","milestones_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/milestones{/number}","notifications_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/labels{/name}","releases_url":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/releases{/id}","created_at":"2015-10-19T11:43:31Z","updated_at":"2015-10-29T15:21:05Z","pushed_at":"2015-11-04T17:00:15Z","git_url":"git://github.com/ubuntu-core/snappy-cloud-image.git","ssh_url":"git@github.com:ubuntu-core/snappy-cloud-image.git","clone_url":"https://github.com/ubuntu-core/snappy-cloud-image.git","svn_url":"https://github.com/ubuntu-core/snappy-cloud-image","homepage":null,"size":1679,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/22"},"html":{"href":"https://github.com/ubuntu-core/snappy-cloud-image/pull/22"},"issue":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues/22"},"comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/ubuntu-core/snappy-cloud-image/statuses/95e312e85b18517874a1ccf76d89d32a972467f3"}}}}