diff --git a/lib/installer.js b/lib/installer.js index e97e625..a629bfd 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -203,6 +203,8 @@ function installJulia(versionInfo, version, arch) { case 'darwin': yield exec.exec('hdiutil', ['attach', juliaDownloadPath]); yield exec.exec('/bin/bash', ['-c', `cp -a /Volumes/Julia-*/Julia-*.app/Contents/Resources/julia ${tempInstallDir}`]); + // Unmount dmg file again to avoid issues on self-hosted runners + yield exec.exec('hdiutil', ['unmount', juliaDownloadPath]); return path.join(tempInstallDir, 'julia'); default: throw new Error(`Platform ${osPlat} is not supported`); diff --git a/package-lock.json b/package-lock.json index 528ac1c..346ce1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "setup-julia", - "version": "1.6.1", + "version": "1.7.1", "license": "MIT", "dependencies": { "@actions/core": "^1.2.6", diff --git a/package.json b/package.json index 76f24a0..6f858e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-julia", - "version": "1.7.1", + "version": "1.7.2", "private": true, "description": "setup Julia action", "main": "lib/setup-julia.js", diff --git a/src/installer.ts b/src/installer.ts index 8a1e94b..7bdfaf6 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -203,6 +203,10 @@ export async function installJulia(versionInfo, version: string, arch: string): case 'darwin': await exec.exec('hdiutil', ['attach', juliaDownloadPath]) await exec.exec('/bin/bash', ['-c', `cp -a /Volumes/Julia-*/Julia-*.app/Contents/Resources/julia ${tempInstallDir}`]) + + // Unmount dmg file again to avoid issues on self-hosted runners + await exec.exec('hdiutil', ['unmount', juliaDownloadPath]) + return path.join(tempInstallDir, 'julia') default: throw new Error(`Platform ${osPlat} is not supported`)