mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +00:00
bugfix: Don't attempt to use Windows fallbacks on non-Windows OSes
This commit is contained in:
parent
a4fcaaf314
commit
57b2336da3
1 changed files with 3 additions and 3 deletions
|
@ -127,8 +127,8 @@ export default abstract class BaseDistribution {
|
||||||
try {
|
try {
|
||||||
downloadPath = await tc.downloadTool(info.downloadUrl);
|
downloadPath = await tc.downloadTool(info.downloadUrl);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof tc.HTTPError && err.httpStatusCode == 404) {
|
if (err instanceof tc.HTTPError && err.httpStatusCode == 404 && this.osPlat == 'win32') {
|
||||||
return await this.acquireNodeFromFallbackLocation(
|
return await this.acquireWindowsNodeFromFallbackLocation(
|
||||||
info.resolvedVersion,
|
info.resolvedVersion,
|
||||||
info.arch
|
info.arch
|
||||||
);
|
);
|
||||||
|
@ -151,7 +151,7 @@ export default abstract class BaseDistribution {
|
||||||
return {range: valid, options};
|
return {range: valid, options};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async acquireNodeFromFallbackLocation(
|
protected async acquireWindowsNodeFromFallbackLocation(
|
||||||
version: string,
|
version: string,
|
||||||
arch: string = os.arch()
|
arch: string = os.arch()
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue