mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 11:06:53 +08:00
Fix linux install script
This commit is contained in:
6
lib/installer.js
generated
6
lib/installer.js
generated
@@ -113,8 +113,10 @@ function installJulia(version, arch) {
|
|||||||
// Install it
|
// Install it
|
||||||
switch (osPlat) {
|
switch (osPlat) {
|
||||||
case 'linux':
|
case 'linux':
|
||||||
const juliaExtractedFolder = yield tc.extractTar(juliaDownloadPath);
|
// tc.extractTar doesn't support stripping components, so we have to call tar manually
|
||||||
return path.join(juliaExtractedFolder, `julia-${version}`);
|
yield exec.exec('mkdir', [`${process.env.HOME}/julia`]);
|
||||||
|
yield exec.exec('tar', ['xf', juliaDownloadPath, '--strip-components=1', '-C', `${process.env.HOME}/julia`]);
|
||||||
|
return `${process.env.HOME}/julia`;
|
||||||
case 'win32':
|
case 'win32':
|
||||||
const juliaInstallationPath = path.join('C:', 'Julia');
|
const juliaInstallationPath = path.join('C:', 'Julia');
|
||||||
yield exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/S /D=${juliaInstallationPath}" -NoNewWindow -Wait`]);
|
yield exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/S /D=${juliaInstallationPath}" -NoNewWindow -Wait`]);
|
||||||
|
|||||||
@@ -106,8 +106,10 @@ export async function installJulia(version: string, arch: string): Promise<strin
|
|||||||
// Install it
|
// Install it
|
||||||
switch (osPlat) {
|
switch (osPlat) {
|
||||||
case 'linux':
|
case 'linux':
|
||||||
const juliaExtractedFolder = await tc.extractTar(juliaDownloadPath)
|
// tc.extractTar doesn't support stripping components, so we have to call tar manually
|
||||||
return path.join(juliaExtractedFolder, `julia-${version}`)
|
await exec.exec('mkdir', [`${process.env.HOME}/julia`])
|
||||||
|
await exec.exec('tar', ['xf', juliaDownloadPath, '--strip-components=1', '-C', `${process.env.HOME}/julia`])
|
||||||
|
return `${process.env.HOME}/julia`
|
||||||
case 'win32':
|
case 'win32':
|
||||||
const juliaInstallationPath = path.join('C:', 'Julia')
|
const juliaInstallationPath = path.join('C:', 'Julia')
|
||||||
await exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/S /D=${juliaInstallationPath}" -NoNewWindow -Wait`])
|
await exec.exec('powershell', ['-Command', `Start-Process -FilePath ${juliaDownloadPath} -ArgumentList "/S /D=${juliaInstallationPath}" -NoNewWindow -Wait`])
|
||||||
|
|||||||
Reference in New Issue
Block a user