From ed4a842dbe8090f0aa7bfae4a5a5303ef8f1b1f5 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Wed, 19 Jun 2024 16:58:30 -0400 Subject: [PATCH] Use Windows system `tar` (not the Git Bash `tar`) (#206) * use windows tar, not git bash one * correct manual patch * rebuild * Update src/installer.ts Co-authored-by: Dilum Aluthge * Update installer.js * Include the direct URL of the issue (not just the issue number) * npm run build --------- Co-authored-by: Dilum Aluthge Co-authored-by: Viral B. Shah --- lib/installer.js | 4 +++- src/installer.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/installer.js b/lib/installer.js index 4232965a..978f91bb 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -291,7 +291,9 @@ function installJulia(dest, versionInfo, version, arch) { } else { // This is the more common path. Using .tar.gz is much faster - yield exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]); + // don't use the Git bash provided tar. Issue #205 + // https://github.com/julia-actions/setup-julia/issues/205 + yield exec.exec('powershell', ['-Command', `& "$env:WINDIR/System32/tar" xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]); } return dest; case 'darwin': diff --git a/src/installer.ts b/src/installer.ts index 1d2b68ef..62e79711 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -263,7 +263,9 @@ export async function installJulia(dest: string, versionInfo, version: string, a } } else { // This is the more common path. Using .tar.gz is much faster - await exec.exec('powershell', ['-Command', `tar xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]) + // don't use the Git bash provided tar. Issue #205 + // https://github.com/julia-actions/setup-julia/issues/205 + await exec.exec('powershell', ['-Command', `& "$env:WINDIR/System32/tar" xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]) } return dest case 'darwin':