diff --git a/lib/installer.js b/lib/installer.js index 4232965a..6c71a113 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -291,7 +291,21 @@ 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(); + // const tar_path = tarInput ? tarInput : "$env:WINDIR/System32/tar" // TODO: delete this line + if (tarInput) { + // If the user provides the `tar` input, use that. + yield exec.exec('powershell', ['-Command', `& "${tarInput}" xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]); + } + 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 + yield exec.exec('powershell', ['-Command', `& "$env:WINDIR/System32/tar" xf ${juliaDownloadPath} --strip-components=1 -C ${dest}`]); + } + // const tar_command = `& "${tar_path}" xf "${juliaDownloadPath}" --strip-components=1 -C "${dest}"` // TODO: delete this line + // core.debug(`tar_command: ${tar_command}`) // TODO: delete this line } return dest; case 'darwin':