diff --git a/lib/decompress.ps1 b/lib/decompress.ps1 index c694f73a25..505bfffef9 100644 --- a/lib/decompress.ps1 +++ b/lib/decompress.ps1 @@ -143,8 +143,9 @@ function Expand-ZstdArchive { ) $ZstdPath = Get-HelperPath -Helper Zstd $LogPath = "$(Split-Path $Path)\zstd.log" + $DestinationPath = $DestinationPath.TrimEnd("\") ensure $DestinationPath | Out-Null - $ArgList = @('-d', "`"$Path`"", '--output-dir-flat', "`"$DestinationPath`"") + $ArgList = @('-d', "`"$Path`"", '--output-dir-flat', "`"$DestinationPath`"", "-v") if ($Switches) { $ArgList += (-split $Switches) } @@ -164,7 +165,7 @@ function Expand-ZstdArchive { } if ($IsTar) { # Check for tar - $TarFile = Get-ChildItem -Path $DestinationPath -Filter '*.tar' + $TarFile = (strip_ext $Path) Expand-7zipArchive -Path "$TarFile" -DestinationPath $DestinationPath -ExtractDir $ExtractDir -Removal } if ($Removal) { diff --git a/lib/install.ps1 b/lib/install.ps1 index a18b8f4459..d2b4dcdb3c 100644 --- a/lib/install.ps1 +++ b/lib/install.ps1 @@ -596,10 +596,10 @@ function dl_urls($app, $version, $manifest, $bucket, $architecture, $dir, $use_c } else { $extract_fn = 'Expand-MsiArchive' } + } elseif(Test-ZstdRequirement -File $fname) { # Zstd first + $extract_fn = 'Expand-ZstdArchive' } elseif(Test-7zipRequirement -File $fname) { # 7zip $extract_fn = 'Expand-7zipArchive' - } elseif(Test-ZstdRequirement -File $fname) { # Zstd - $extract_fn = 'Expand-ZstdArchive' } if($extract_fn) {