Unmount dmg file on macOS after copying files

This commit is contained in:
Sascha Mann
2022-05-23 23:31:02 +02:00
parent 67db496725
commit 4b10f2b699
4 changed files with 8 additions and 2 deletions

2
lib/installer.js generated
View File

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