Skip to content

Commit

Permalink
Revert "Remove unzip.ps1"
Browse files Browse the repository at this point in the history
This reverts commit 778c61a.
  • Loading branch information
ntkme committed Sep 10, 2022
1 parent 8117750 commit 4724a84
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/sass/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ module FileUtils
sh 'tar', '-vxC', dest, '-f', archive
when ->(name) { name.end_with?('.zip') }
if Gem.win_platform?
sh 'cscript', 'unzip.vbs', '//B', '//Nologo', archive, dest
sh 'powershell', '-NoLogo', '-NoProfile', '-NonInteractive',
'-File', 'unzip.ps1', '-Archive', archive, '-DestinationPath', dest
else
sh 'unzip', '-od', dest, archive
end
Expand Down
13 changes: 13 additions & 0 deletions ext/sass/unzip.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Param(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string]$Archive,
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string]$DestinationPath
)
if (Get-Command Expand-Archive -ErrorAction SilentlyContinue) {
Get-Item $Archive | Expand-Archive -DestinationPath $DestinationPath -Force
} else {
CScript unzip.vbs //B //Nologo $Archive $DestinationPath
}
1 change: 1 addition & 0 deletions sass-embedded.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Gem::Specification.new do |spec| # rubocop:disable Gemspec/RequireMFA
spec.extensions = ['ext/sass/Rakefile']
spec.files += [
'ext/sass/package.json',
'ext/sass/unzip.ps1',
'ext/sass/unzip.vbs',
'ext/sass/Rakefile'
]
Expand Down

0 comments on commit 4724a84

Please sign in to comment.