{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/34529223","id":34529223,"diff_hunk":"@@ -93,7 +93,12 @@ def move_into(dir)\n       # @api private\n       # @return [String] path to temporary unpacking location\n       def tmpdir\n-        @dir ||= Dir.mktmpdir('tmp-unpacker', Puppet::Forge::Cache.base_path)\n+        base_path = nil\n+        if !Puppet::Util::Platform.windows?\n+          base_path = Puppet::Forge::Cache.base_path\n+        end\n+\n+        @dir ||= Dir.mktmpdir('tmp-unpacker', base_path)","path":"lib/puppet/module_tool/applications/unpacker.rb","position":10,"original_position":10,"commit_id":"58ee332fca6b67194bec050609e0fc1d09510f6a","original_commit_id":"58ee332fca6b67194bec050609e0fc1d09510f6a","user":{"login":"cowofevil","id":1972333,"avatar_url":"https://avatars.githubusercontent.com/u/1972333?v=3","gravatar_id":"","url":"https://api.github.com/users/cowofevil","html_url":"https://github.com/cowofevil","followers_url":"https://api.github.com/users/cowofevil/followers","following_url":"https://api.github.com/users/cowofevil/following{/other_user}","gists_url":"https://api.github.com/users/cowofevil/gists{/gist_id}","starred_url":"https://api.github.com/users/cowofevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowofevil/subscriptions","organizations_url":"https://api.github.com/users/cowofevil/orgs","repos_url":"https://api.github.com/users/cowofevil/repos","events_url":"https://api.github.com/users/cowofevil/events{/privacy}","received_events_url":"https://api.github.com/users/cowofevil/received_events","type":"User","site_admin":false},"body":"I suggest putting a comment in that clarifies the behavior of the \"mktmpdir\" method when a nil destination path is supplied.","created_at":"2015-07-14T01:02:40Z","updated_at":"2015-07-14T01:02:40Z","html_url":"https://github.com/puppetlabs/puppet/pull/4085#discussion_r34529223","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4085","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/34529223"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4085#discussion_r34529223"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4085"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4085","id":39868015,"html_url":"https://github.com/puppetlabs/puppet/pull/4085","diff_url":"https://github.com/puppetlabs/puppet/pull/4085.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/4085.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4085","number":4085,"state":"open","locked":false,"title":"(WIP) (PUP-4854) Shorten PMT TEMP location on Windows","user":{"login":"Iristyle","id":394081,"avatar_url":"https://avatars.githubusercontent.com/u/394081?v=3","gravatar_id":"","url":"https://api.github.com/users/Iristyle","html_url":"https://github.com/Iristyle","followers_url":"https://api.github.com/users/Iristyle/followers","following_url":"https://api.github.com/users/Iristyle/following{/other_user}","gists_url":"https://api.github.com/users/Iristyle/gists{/gist_id}","starred_url":"https://api.github.com/users/Iristyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iristyle/subscriptions","organizations_url":"https://api.github.com/users/Iristyle/orgs","repos_url":"https://api.github.com/users/Iristyle/repos","events_url":"https://api.github.com/users/Iristyle/events{/privacy}","received_events_url":"https://api.github.com/users/Iristyle/received_events","type":"User","site_admin":false},"body":" - For modules that install on Windows and use a long hierarchical\r\n   directory structure, the default TEMP path where PMT extracts the\r\n   modules tarball can be problematic. Windows has a default maximum\r\n   path length of 260 characters that must be carefully navigated.\r\n\r\n   By default, the extracted temp location looks like:\r\n\r\n   C:\\ProgramData\\PuppetLabs\\puppet\\cache\\puppet-module\\cache\\tmp-unpackerYYYYMMDD-XXXX-xxxxxxx\r\n\r\n   The default install location of a puppet 4.0+ module is:\r\n\r\n   C:\\ProgramData\\PuppetLabs\\code\\environments\\production\\modules\r\n\r\n   By initially extracting to such a long path, 30 valuable characters\r\n   are wasted (92 char current temp path vs 62 char install path).\r\n\r\n   On Windows, the TEMP directory can be used as a location to extract\r\n   to, and this is the default for Dir.mkdir.  Depending on the user,\r\n   this path will typically be one of the following:\r\n\r\n   C:\\Users\\Administrator\\AppData\\Local\\Temp  (41 chars)\r\n   C:\\Windows\\Temp                            (15 chars)","created_at":"2015-07-13T23:30:07Z","updated_at":"2015-07-14T01:02:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6109b7340962c5e71ac8907a54ba4dcdc88c7793","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4085/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4085/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4085/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/58ee332fca6b67194bec050609e0fc1d09510f6a","head":{"label":"Iristyle:ticket/stable/PUP-4854-PMT-temp-path-too-long-on-Windows","ref":"ticket/stable/PUP-4854-PMT-temp-path-too-long-on-Windows","sha":"58ee332fca6b67194bec050609e0fc1d09510f6a","user":{"login":"Iristyle","id":394081,"avatar_url":"https://avatars.githubusercontent.com/u/394081?v=3","gravatar_id":"","url":"https://api.github.com/users/Iristyle","html_url":"https://github.com/Iristyle","followers_url":"https://api.github.com/users/Iristyle/followers","following_url":"https://api.github.com/users/Iristyle/following{/other_user}","gists_url":"https://api.github.com/users/Iristyle/gists{/gist_id}","starred_url":"https://api.github.com/users/Iristyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iristyle/subscriptions","organizations_url":"https://api.github.com/users/Iristyle/orgs","repos_url":"https://api.github.com/users/Iristyle/repos","events_url":"https://api.github.com/users/Iristyle/events{/privacy}","received_events_url":"https://api.github.com/users/Iristyle/received_events","type":"User","site_admin":false},"repo":{"id":12253882,"name":"puppet","full_name":"Iristyle/puppet","owner":{"login":"Iristyle","id":394081,"avatar_url":"https://avatars.githubusercontent.com/u/394081?v=3","gravatar_id":"","url":"https://api.github.com/users/Iristyle","html_url":"https://github.com/Iristyle","followers_url":"https://api.github.com/users/Iristyle/followers","following_url":"https://api.github.com/users/Iristyle/following{/other_user}","gists_url":"https://api.github.com/users/Iristyle/gists{/gist_id}","starred_url":"https://api.github.com/users/Iristyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iristyle/subscriptions","organizations_url":"https://api.github.com/users/Iristyle/orgs","repos_url":"https://api.github.com/users/Iristyle/repos","events_url":"https://api.github.com/users/Iristyle/events{/privacy}","received_events_url":"https://api.github.com/users/Iristyle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Iristyle/puppet","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/Iristyle/puppet","forks_url":"https://api.github.com/repos/Iristyle/puppet/forks","keys_url":"https://api.github.com/repos/Iristyle/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Iristyle/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Iristyle/puppet/teams","hooks_url":"https://api.github.com/repos/Iristyle/puppet/hooks","issue_events_url":"https://api.github.com/repos/Iristyle/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/Iristyle/puppet/events","assignees_url":"https://api.github.com/repos/Iristyle/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/Iristyle/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/Iristyle/puppet/tags","blobs_url":"https://api.github.com/repos/Iristyle/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Iristyle/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Iristyle/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Iristyle/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Iristyle/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/Iristyle/puppet/languages","stargazers_url":"https://api.github.com/repos/Iristyle/puppet/stargazers","contributors_url":"https://api.github.com/repos/Iristyle/puppet/contributors","subscribers_url":"https://api.github.com/repos/Iristyle/puppet/subscribers","subscription_url":"https://api.github.com/repos/Iristyle/puppet/subscription","commits_url":"https://api.github.com/repos/Iristyle/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Iristyle/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Iristyle/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Iristyle/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Iristyle/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/Iristyle/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Iristyle/puppet/merges","archive_url":"https://api.github.com/repos/Iristyle/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Iristyle/puppet/downloads","issues_url":"https://api.github.com/repos/Iristyle/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/Iristyle/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/Iristyle/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/Iristyle/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Iristyle/puppet/labels{/name}","releases_url":"https://api.github.com/repos/Iristyle/puppet/releases{/id}","created_at":"2013-08-20T20:49:43Z","updated_at":"2015-02-14T00:06:23Z","pushed_at":"2015-07-13T23:29:44Z","git_url":"git://github.com/Iristyle/puppet.git","ssh_url":"git@github.com:Iristyle/puppet.git","clone_url":"https://github.com/Iristyle/puppet.git","svn_url":"https://github.com/Iristyle/puppet","homepage":"http://www.puppetlabs.com/puppet/introduction/","size":50843,"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":"puppetlabs:stable","ref":"stable","sha":"b7b184a67815af3580f2042e0c72a4c573b5f7a8","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":910744,"name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","created_at":"2010-09-14T19:26:44Z","updated_at":"2015-07-13T11:04:27Z","pushed_at":"2015-07-14T00:02:14Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"http://www.puppetlabs.com/puppet/introduction/","size":117210,"stargazers_count":3430,"watchers_count":3430,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1452,"mirror_url":null,"open_issues_count":30,"forks":1452,"open_issues":30,"watchers":3430,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4085"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4085"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4085"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4085/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4085/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4085/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/58ee332fca6b67194bec050609e0fc1d09510f6a"}}}}