Skip to content

Commit 55ce0c0

Browse files
committed
Check if 7zip installed via Scoop instead of using 7z.exe from PATH
1 parent 0f46401 commit 55ce0c0

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/core.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ function file_path($app, $file) {
113113
return $null
114114
}
115115

116+
function 7zip_path() {
117+
return (file_path '7zip' '7z.exe')
118+
}
119+
120+
function 7zip_installed() {
121+
return ![String]::IsNullOrWhiteSpace("$(7zip_path)")
122+
}
123+
116124
function aria2_path() {
117125
return (file_path 'aria2' 'aria2c.exe')
118126
}

lib/decompress.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
function 7zip_installed { cmd_available '7z' }
2-
31
function requires_7zip($manifest, $architecture) {
42
foreach($dlurl in @(url $manifest $architecture)) {
53
if(file_requires_7zip $dlurl) { return $true }

0 commit comments

Comments
 (0)