Skip to content

Commit

Permalink
Fix sous-chefs#164 - When using 7zip to extract with strip_components…
Browse files Browse the repository at this point in the history
… >= 1 (default is 1) extracts to home_dir, not path
  • Loading branch information
sgtcoolguy committed Nov 16, 2016
1 parent e8fdfb1 commit 45ecdc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/sevenzip_command_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def sevenzip_command
currdir += "\\%#{count}"
end

cmd += "#{ENV.fetch('SystemRoot')}\\System32\\xcopy \"#{currdir}\" \"#{resource.home_dir}\" /s /e"
cmd += "#{ENV.fetch('SystemRoot')}\\System32\\xcopy \"#{currdir}\" \"#{resource.path}\" /s /e"
end

def sevenzip_binary
Expand All @@ -66,7 +66,7 @@ def extension_is_tar
if resource.extension =~ /tar.gz|tgz|tar.bz2|tbz|tar.xz|txz/
" -so | #{sevenzip_binary} x -aoa -si -ttar"
else
''
' -aoa' # force overwrite, Fixes #164
end
end

Expand Down

0 comments on commit 45ecdc2

Please sign in to comment.