retry logic
This commit is contained in:
15
dist/setup/index.js
vendored
15
dist/setup/index.js
vendored
@@ -105076,8 +105076,16 @@ function run() {
|
||||
yield installVersion(stringVersion);
|
||||
}
|
||||
catch (error) {
|
||||
core.info(`${stringVersion} not found`);
|
||||
throw new Error("some err");
|
||||
core.debug(`${error.toString()}`);
|
||||
try {
|
||||
const majorMinorVersion = getHigherVersion(stringVersion);
|
||||
yield installVersion(majorMinorVersion);
|
||||
}
|
||||
catch (error) {
|
||||
core.debug(`${error.toString()}`);
|
||||
const majorVersion = getHigherVersion(stringVersion);
|
||||
yield installVersion(majorVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const [index, version] of versions.entries()) {
|
||||
@@ -105112,6 +105120,9 @@ function run() {
|
||||
core.info('');
|
||||
});
|
||||
}
|
||||
function getHigherVersion(version) {
|
||||
return version.substring(0, version.lastIndexOf("."));
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
|
||||
Reference in New Issue
Block a user