Fix linux install script

This commit is contained in:
Sascha Mann
2019-11-24 20:55:46 +01:00
parent 767e91ee6e
commit 41539df7fe
2 changed files with 8 additions and 4 deletions

6
lib/installer.js generated
View File

@@ -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`]);

View File

@@ -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`])