Skip to content

Commit

Permalink
decompress: Fix get_config calls
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Apr 26, 2019
1 parent 1a6fd6e commit 79a6d5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/decompress.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Test-7ZipRequirement {
$File
)
if ($URL) {
if (get_config 7ZIPEXTRACT_USE_EXTERNAL) {
if ((get_config 7ZIPEXTRACT_USE_EXTERNAL)) {
return $false
} else {
return ($URL | Where-Object { Test-7ZipRequirement -File $_ }).Count -gt 0
Expand All @@ -28,7 +28,7 @@ function Test-LessMSIRequirement {
[String[]]
$URL
)
if (get_config MSIEXTRACT_USE_LESSMSI) {
if ((get_config MSIEXTRACT_USE_LESSMSI)) {
return ($URL | Where-Object { $_ -match '\.msi$' }).Count -gt 0
} else {
return $false
Expand All @@ -48,7 +48,7 @@ function Expand-7ZipArchive {
$Removal
)
$LogLocation = "$(Split-Path $Path)\7zip.log"
if (get_config 7ZIPEXTRACT_USE_EXTERNAL) {
if ((get_config 7ZIPEXTRACT_USE_EXTERNAL)) {
try {
7z x "$Path" -o"$DestinationPath" -y | Out-File $LogLocation
} catch [System.Management.Automation.CommandNotFoundException] {
Expand Down Expand Up @@ -92,7 +92,7 @@ function Expand-MSIArchive {
$Removal
)
$LogLocation = "$(Split-Path $Path)\msi.log"
if (get_config MSIEXTRACT_USE_LESSMSI) {
if ((get_config MSIEXTRACT_USE_LESSMSI)) {
&(file_path lessmsi lessmsi.exe) x "$Path" "$DestinationPath\" | Out-File $LogLocation
if ($LASTEXITCODE -ne 0) {
abort "Failed to extract files from $Path.`nLog file:`n $(friendly_path $LogLocation)"
Expand Down

0 comments on commit 79a6d5c

Please sign in to comment.