Skip to content

Commit

Permalink
fix(depends): Check if extractor is available (ScoopInstaller#4042)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgziminsky authored and se35710 committed Mar 8, 2022
1 parent 4ef9857 commit 0aedf4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- **autoupdate:** Allow checksum file that contains whitespaces ([#4619](https://github.com/ScoopInstaller/Scoop/issues/4619))
- **config:** Allow scoop config use Unicode characters ([#4631](https://github.com/ScoopInstaller/Scoop/issues/4631))
- **depends:** Prevent error on no URL ([#4595](https://github.com/ScoopInstaller/Scoop/issues/4595))
- **depends:** Check if extractor is available ([#4042](https://github.com/ScoopInstaller/Scoop/issues/4042))
- **decompress:** Fix nested Zstd archive extraction ([#4608](https://github.com/ScoopInstaller/Scoop/issues/4608))
- **shim:** Fix PS1 shim error when in different drive in PS7 ([#4614](https://github.com/ScoopInstaller/Scoop/issues/4614))

Expand Down
10 changes: 5 additions & 5 deletions lib/depends.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ function script_deps($script) {
return $deps
}

if($script -like '*Expand-7zipArchive *' -or $script -like '*extract_7zip *') {
if (!(Test-HelperInstalled -Helper 7zip) -and ($script -like '*Expand-7zipArchive *' -or $script -like '*extract_7zip *')) {
$deps += '7zip'
}
if($script -like '*Expand-MsiArchive *' -or $script -like '*extract_msi *') {
if (!(Test-HelperInstalled -Helper Lessmsi) -and ($script -like '*Expand-MsiArchive *' -or $script -like '*extract_msi *')) {
$deps += 'lessmsi'
}
if($script -like '*Expand-InnoArchive *' -or $script -like '*unpack_inno *') {
if (!(Test-HelperInstalled -Helper Innounp) -and ($script -like '*Expand-InnoArchive *' -or $script -like '*unpack_inno *')) {
$deps += 'innounp'
}
if($script -like '*Expand-DarkArchive *') {
if (!(Test-HelperInstalled -Helper Dark) -and $script -like '*Expand-DarkArchive *') {
$deps += 'dark'
}
if ($script -like '*Expand-ZstdArchive *') {
if (!(Test-HelperInstalled -Helper Zstd) -and $script -like '*Expand-ZstdArchive *') {
$deps += 'zstd'
}

Expand Down

0 comments on commit 0aedf4e

Please sign in to comment.