Skip to content

Commit

Permalink
Check if 7zip installed via Scoop instead of using 7z.exe from PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Aug 8, 2018
1 parent 0f46401 commit 55ce0c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 8 additions & 0 deletions lib/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ function file_path($app, $file) {
return $null
}

function 7zip_path() {
return (file_path '7zip' '7z.exe')
}

function 7zip_installed() {
return ![String]::IsNullOrWhiteSpace("$(7zip_path)")
}

function aria2_path() {
return (file_path 'aria2' 'aria2c.exe')
}
Expand Down
2 changes: 0 additions & 2 deletions lib/decompress.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
function 7zip_installed { cmd_available '7z' }

function requires_7zip($manifest, $architecture) {
foreach($dlurl in @(url $manifest $architecture)) {
if(file_requires_7zip $dlurl) { return $true }
Expand Down

0 comments on commit 55ce0c0

Please sign in to comment.