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
4747
4848 # Return the base Pathname for all the caches.
4949 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 |
5151 o . mkpath unless o . exist?
5252 end
5353 end
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def validate_entry(destdir, path)
107107 raise Puppet ::ModuleTool ::Errors ::InvalidPathInPackageError , :entry_path => path , :directory => destdir
108108 end
109109
110- path = File . expand_path File . join ( destdir , path )
110+ path = Pathname . new ( File . join ( destdir , path ) ) . cleanpath . to_path
111111
112112 if path !~ /\A #{ Regexp . escape destdir } /
113113 raise Puppet ::ModuleTool ::Errors ::InvalidPathInPackageError , :entry_path => path , :directory => destdir
Original file line number Diff line number Diff line change 3434
3535 if Puppet ::Util ::Platform . windows?
3636 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 ( '/' , '\\' )
3938 end
4039 end
4140
You can’t perform that action at this time.
0 commit comments