mirror of
https://github.com/actions/setup-node
synced 2025-04-17 13:43:12 +00:00
bugfix: Don't attempt to use Windows fallbacks on non-Windows OSes
This commit is contained in:
parent
a4fcaaf314
commit
57b2336da3
@ -127,8 +127,8 @@ export default abstract class BaseDistribution {
|
||||
try {
|
||||
downloadPath = await tc.downloadTool(info.downloadUrl);
|
||||
} catch (err) {
|
||||
if (err instanceof tc.HTTPError && err.httpStatusCode == 404) {
|
||||
return await this.acquireNodeFromFallbackLocation(
|
||||
if (err instanceof tc.HTTPError && err.httpStatusCode == 404 && this.osPlat == 'win32') {
|
||||
return await this.acquireWindowsNodeFromFallbackLocation(
|
||||
info.resolvedVersion,
|
||||
info.arch
|
||||
);
|
||||
@ -151,7 +151,7 @@ export default abstract class BaseDistribution {
|
||||
return {range: valid, options};
|
||||
}
|
||||
|
||||
protected async acquireNodeFromFallbackLocation(
|
||||
protected async acquireWindowsNodeFromFallbackLocation(
|
||||
version: string,
|
||||
arch: string = os.arch()
|
||||
): Promise<string> {
|
||||
|
Loading…
Reference in New Issue
Block a user