mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 02:56:54 +08:00
Add more error checking in getNightlyFileName (#237)
This commit is contained in:
@@ -124,22 +124,34 @@ function getNightlyFileName(arch: string): string {
|
||||
[fileExt1, , ] = getDesiredFileExts()
|
||||
|
||||
if (osPlat == 'win32') {
|
||||
versionExt = arch == 'x64' ? '-win64' : '-win32'
|
||||
if (arch == 'x86') {
|
||||
versionExt = '-win32'
|
||||
} else if (arch == 'aarch64') {
|
||||
throw new Error('Aarch64 Julia is not available on Windows')
|
||||
} else if (arch == 'x64') {
|
||||
versionExt = '-win64'
|
||||
} else {
|
||||
throw new Error(`Architecture ${arch} is not supported on Windows`)
|
||||
}
|
||||
} else if (osPlat == 'darwin') {
|
||||
if (arch == 'x86') {
|
||||
throw new Error('32-bit Julia is not available on macOS')
|
||||
throw new Error('32-bit (x86) Julia is not available on macOS')
|
||||
} else if (arch == 'aarch64') {
|
||||
versionExt = '-macaarch64'
|
||||
} else {
|
||||
} else if (arch == 'x64') {
|
||||
versionExt = '-mac64'
|
||||
} else {
|
||||
throw new Error(`Architecture ${arch} is not supported on macOS`)
|
||||
}
|
||||
} else if (osPlat === 'linux') {
|
||||
if (arch == 'x86') {
|
||||
versionExt = '-linux32'
|
||||
} else if (arch == 'aarch64') {
|
||||
versionExt = '-linux-aarch64'
|
||||
} else {
|
||||
} else if (arch == 'x64') {
|
||||
versionExt = '-linux64'
|
||||
} else {
|
||||
throw new Error(`Architecture ${arch} is not supported on Linux`)
|
||||
}
|
||||
} else {
|
||||
throw new Error(`Platform ${osPlat} is not supported`)
|
||||
|
||||
Reference in New Issue
Block a user