Skip to content

Commit ef4b397

Browse files
authored
UniversalPackages: Fix 'tar' command args (#621)
1 parent fd72bbd commit ef4b397

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/UniversalPackages/DownloadUniversalPackages.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ private string GetArtifactToolReleaseInfoUrl(string osName, string arch)
659659
: "linux-x64";
660660
fileExtension = ".tar.gz";
661661
}
662-
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
662+
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
663663
{
664664
rid = RuntimeInformation.ProcessArchitecture == Architecture.Arm64
665665
? "osx-arm64"
@@ -751,7 +751,7 @@ private bool DownloadAndExtractArchive(string displayName, string downloadUri, s
751751
// There is no built-in support for extracting tar.gz files, so fall back to the tar command.
752752
int exitCode = ProcessHelper.Execute(
753753
"/bin/bash",
754-
$"tar -xzf \"{archiveDownloadPath}\" -C \"{archiveExtractPath}\"",
754+
$"-c \"tar -xzf \\\"{archiveDownloadPath}\\\" -C \\\"{archiveExtractPath}\\\"\"",
755755
processStdOut: message => Log.LogMessage(MessageImportance.Low, message),
756756
processStdErr: message => Log.LogError(message));
757757
if (exitCode != 0)

0 commit comments

Comments
 (0)