Jira (PUP-4884) PMT won't install a module on windows if module_working_dir contains backslashes

16 views
Skip to first unread message

Josh Cooper (JIRA)

unread,
Jul 15, 2015, 2:19:10 PM7/15/15
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Bug PUP-4884
PMT won't install a module on windows if module_working_dir contains backslashes
Issue Type: Bug Bug
Assignee: Unassigned
Components: PMT, Windows
Created: 2015/07/15 11:18 AM
Priority: Normal Normal
Reporter: Josh Cooper

If you override module_working_dir using a native windows path with backslashes, the PMT will fail to install the module, because it expects the path to contain forward slashes:

C:\work\puppet [stable +25 ~0 -0 !]> bundle exec puppet module install puppetlabs-stdlib --module_working_dir C:\Windows\Temp --debug
...
Error: Could not install package
  Package attempted to install file into
  "C:/Windows/Temp/cache/tmp-unpacker20150714-3276-hqzekd/puppetlabs-stdlib-4.6.0" under "C:\\Windows\\Temp/cache/tmp-unpacker20150714-3276-hqzekd".

Changing that to forward slashes works, including if the case doesn't match:

C:\work\puppet [stable +25 ~0 -0 !]> bundle exec puppet module install puppetlab
s-stdlib --module_working_dir C:/windows/temp --debug
...
Debug: Extracting: C:/windows/temp/cache/tmp-unpacker20150714-2640-1mynaxp/puppe
tlabs-stdlib-4.6.0/lib/facter/util/puppet_settings.rb
Notice: Installing -- do not interrupt ...
C:/ProgramData/PuppetLabs/code/modules
└── puppetlabs-stdlib (v4.6.0)

A simple fix would be to ensure we call File.expand_path on whatever value is specified, as that canonicalizes the path (from ruby's perspective):

C:\work\puppet [stable +25 ~0 -0 !]> irb
irb(main):001:0> File.expand_path('C:\Windows\Temp')
=> "C:/Windows/Temp"

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
Atlassian logo

Rob Reynolds (JIRA)

unread,
Aug 4, 2015, 5:57:10 PM8/4/15
to puppe...@googlegroups.com

Kenaz Kwa (JIRA)

unread,
Aug 29, 2016, 7:47:17 PM8/29/16
to puppe...@googlegroups.com
Kenaz Kwa updated an issue
Change By: Kenaz Kwa
Team: Agent & Platform Support
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Josh Cooper (JIRA)

unread,
May 16, 2017, 6:17:04 PM5/16/17
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: triaged windows
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Lindsey Smith (JIRA)

unread,
Nov 27, 2017, 2:48:02 PM11/27/17
to puppe...@googlegroups.com
Lindsey Smith updated an issue
Change By: Lindsey Smith
Team: Platform Core Puppet Developer Experience
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 6, 2020, 8:08:03 PM6/6/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP-7546
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 11, 2021, 12:54:02 AM6/11/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Platform Core KANBAN
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 11, 2021, 12:54:02 AM6/11/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Puppet Developer Experience Coremunity

Gabriel Nagy (Jira)

unread,
Jun 11, 2021, 10:46:03 AM6/11/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 14, 2021, 12:58:02 PM6/14/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 14, 2021, 12:59:02 PM6/14/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: Fixes a bug the prevented "puppet module install" from working on Windows when overriding the "module_working_dir" setting with a path containing backslashes, e.g. C:\modules

Josh Cooper (Jira)

unread,
Jun 14, 2021, 1:01:02 PM6/14/21
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Jul 13, 2021, 6:35:03 AM7/13/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages