Skip to content

Commit

Permalink
fix(scoop-checkup): Don't throw 7zip error when external 7zip is used (
Browse files Browse the repository at this point in the history
…#5703)

* fix(scoop-checkup): Don't throw 7zip error when external 7zip is used

* Update CHANGELOG.md
  • Loading branch information
rashil2000 authored Oct 26, 2023
1 parent 7e81e49 commit fb31696
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- **shim:** Avoid unexpected output of `list` subcommand ([#5681](https://github.com/ScoopInstaller/Scoop/issues/5681))
- **scoop-reset:** Don't abort when multiple apps are passed and an app is running ([#5687](https://github.com/ScoopInstaller/Scoop/issues/5687))
- **core:** Do not call `scoop` externally from inside the code ([#5695](https://github.com/ScoopInstaller/Scoop/issues/5695))
- **scoop-checkup:** Don't throw 7zip error when external 7zip is used ([#5703](https://github.com/ScoopInstaller/Scoop/issues/5703))

### Performance Improvements

Expand Down
2 changes: 1 addition & 1 deletion libexec/scoop-checkup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $issues += !(check_main_bucket)
$issues += !(check_long_paths)
$issues += !(Get-WindowsDeveloperModeStatus)

if (!(Test-HelperInstalled -Helper 7zip)) {
if (!(Test-HelperInstalled -Helper 7zip) -and !(get_config USE_EXTERNAL_7ZIP)) {

This comment has been minimized.

Copy link
@Aldo-f

Aldo-f Nov 5, 2023

Maybe also check if the use_external_7zip would work?
Like here:

Scoop/lib/decompress.ps1

Lines 21 to 29 in f930280

if ((get_config USE_EXTERNAL_7ZIP)) {
try {
$7zPath = (Get-Command '7z' -CommandType Application -ErrorAction Stop | Select-Object -First 1).Source
} catch [System.Management.Automation.CommandNotFoundException] {
abort "`nCannot find external 7-Zip (7z.exe) while 'use_external_7zip' is 'true'!`nRun 'scoop config use_external_7zip false' or install 7-Zip manually and try again."
}
} else {
$7zPath = Get-HelperPath -Helper 7zip
}

warn "'7-Zip' is not installed! It's required for unpacking most programs. Please Run 'scoop install 7zip' or 'scoop install 7zip-zstd'."
$issues++
}
Expand Down

0 comments on commit fb31696

Please sign in to comment.