From bfa5a059b9ab12562b6c9ae530e33e6369abbc24 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 18 Jun 2024 22:08:14 -0400 Subject: [PATCH] npm run build --- lib/installer.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/installer.js b/lib/installer.js index 4232965a..3655765e 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -291,7 +291,22 @@ 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}`]); + const tarInput = core.getInput('tar').trim(); + if (tarInput) { + // If the user provides the `tar` input, use that. + const tar_command = `& "${tarInput}" xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`; + core.debug(`tar_command: ${tar_command}`); + yield exec.exec('powershell', ['-Command', tar_command]); + } + else { + // Otherwise, on Windows, use the Windows system tar (not the Git Bash tar). + // https://github.com/julia-actions/setup-julia/issues/205 + // + // // don't use the Git bash provided tar. Issue #205 + const tar_command = `& "$env:WINDIR/System32/tar" xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`; + core.debug(`tar_command: ${tar_command}`); + yield exec.exec('powershell', ['-Command', tar_command]); + } } return dest; case 'darwin':