Skip to content

Commit aa67f14

Browse files
committed
(#11276) Expand Dir.pwd
On Windows, Dir.pwd returns a path with backslashes, which confuses the relative path from, since it doesn't know that 'C:/' and 'C:\' are the same. This commit simply expands Dir.pwd which results in forward slashes.
1 parent 42c6d21 commit aa67f14

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/puppet/module_tool/applications/builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def run
1818
Puppet.notice "Building #{@path} for release"
1919
tar
2020
gzip
21-
relative = Pathname.new(File.join(@pkg_path, filename('tar.gz'))).relative_path_from(Pathname.new(Dir.pwd))
21+
relative = Pathname.new(File.join(@pkg_path, filename('tar.gz'))).relative_path_from(Pathname.new(File.expand_path(Dir.pwd)))
2222

2323
# Return the Pathname object representing the path to the release
2424
# archive just created. This return value is used by the module_tool

0 commit comments

Comments
 (0)