@@ -288,14 +288,13 @@ end
288
288
# This is a FileUtils extension that defines several additional commands to be
289
289
# added to the FileUtils utility functions.
290
290
module FileUtils
291
- def unarchive ( archive , dest = '.' )
292
- mkdir_p dest
291
+ def unarchive ( archive )
293
292
if Gem . win_platform?
294
- sh File . absolute_path ( 'tar.exe' , SassConfig . windows_get_folder_path ( :System ) ) , '-vxC' , dest , '-f ', archive
293
+ sh File . absolute_path ( 'tar.exe' , SassConfig . windows_system_directory ) , '-vxf ' , archive
295
294
elsif archive . downcase . end_with? ( '.zip' )
296
- sh 'unzip' , '-od' , dest , archive
295
+ sh 'unzip' , '-o' , archive
297
296
else
298
- sh 'tar' , '-vxC' , dest , '-f ', archive , '--no-same-owner' , '--no-same-permissions'
297
+ sh 'tar' , '-vxf ' , archive , '--no-same-owner' , '--no-same-permissions'
299
298
end
300
299
end
301
300
@@ -694,15 +693,15 @@ module SassConfig
694
693
end
695
694
end
696
695
697
- def windows_get_folder_path ( folder )
696
+ def windows_system_directory
698
697
require 'open3'
699
698
700
699
stdout , stderr , status = Open3 . capture3 ( 'powershell.exe' ,
701
700
'-NoLogo' ,
702
701
'-NoProfile' ,
703
702
'-NonInteractive' ,
704
703
'-Command' ,
705
- "[Environment]::GetFolderPath('#{ folder } ') | Write-Host -NoNewline" )
704
+ "[Environment]::GetFolderPath('System ') | Write-Host -NoNewline" )
706
705
707
706
raise stderr unless status . success?
708
707
0 commit comments