mirror of
https://github.com/actions/setup-node.git
synced 2025-09-15 10:43:59 +08:00
npm run format
This commit is contained in:
@@ -116,13 +116,17 @@ export default abstract class BaseDistribution {
|
||||
err instanceof Error &&
|
||||
err.message.includes('getaddrinfo EAI_AGAIN')
|
||||
) {
|
||||
core.setFailed(`Network error: Failed to resolve the server at ${dataUrl}.
|
||||
Please check your DNS settings or verify that the URL is correct.`);
|
||||
core.setFailed(
|
||||
`Network error: Failed to resolve the server at ${dataUrl}.Please check your DNS settings or verify that the URL is correct.`
|
||||
);
|
||||
} else if (err instanceof hc.HttpClientError && err.statusCode === 404) {
|
||||
core.setFailed(`404 Error: Unable to find versions at ${dataUrl}.
|
||||
Please verify that the mirror URL is valid.`);
|
||||
core.setFailed(
|
||||
`404 Error: Unable to find versions at ${dataUrl}.Please verify that the mirror URL is valid.`
|
||||
);
|
||||
} else {
|
||||
core.setFailed(`Failed to fetch Node.js versions from ${dataUrl}.Please check the URL and try again.}`);
|
||||
core.setFailed(
|
||||
`Failed to fetch Node.js versions from ${dataUrl}.Please check the URL and try again.}`
|
||||
);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
|
@@ -341,7 +341,9 @@ export default class OfficialBuilds extends BaseDistribution {
|
||||
);
|
||||
} else {
|
||||
// For any other error type, you can log the error message.
|
||||
core.setFailed(`An unexpected error occurred like url might not correct`);
|
||||
core.setFailed(
|
||||
`An unexpected error occurred like url might not correct`
|
||||
);
|
||||
}
|
||||
|
||||
throw error;
|
||||
|
Reference in New Issue
Block a user