File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed
spec/unit/module_tool/applications Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def path
47
47
48
48
# Return the base Pathname for all the caches.
49
49
def self . base_path
50
- ( Pathname ( Puppet . settings [ :module_working_dir ] ) + 'cache' ) . tap do |o |
50
+ ( Pathname ( Puppet . settings [ :module_working_dir ] ) + 'cache' ) . cleanpath . tap do |o |
51
51
o . mkpath unless o . exist?
52
52
end
53
53
end
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def validate_entry(destdir, path)
107
107
raise Puppet ::ModuleTool ::Errors ::InvalidPathInPackageError , :entry_path => path , :directory => destdir
108
108
end
109
109
110
- path = File . expand_path File . join ( destdir , path )
110
+ path = Pathname . new ( File . join ( destdir , path ) ) . cleanpath . to_path
111
111
112
112
if path !~ /\A #{ Regexp . escape destdir } /
113
113
raise Puppet ::ModuleTool ::Errors ::InvalidPathInPackageError , :entry_path => path , :directory => destdir
Original file line number Diff line number Diff line change 34
34
35
35
if Puppet ::Util ::Platform . windows?
36
36
before :each do
37
- allow ( Puppet . settings ) . to receive ( :[] )
38
- allow ( Puppet . settings ) . to receive ( :[] ) . with ( :module_working_dir ) . and_return ( Dir . mktmpdir ( 'installertmp' ) )
37
+ Puppet [ :module_working_dir ] = tmpdir ( 'module_tool_install' ) . gsub ( '/' , '\\' )
39
38
end
40
39
end
41
40
You can’t perform that action at this time.
0 commit comments