[TEMP-FIX] Fix mkdir failing if index already exists (#11)

This commit is contained in:
Mieszko Grodzicki 2023-02-22 12:42:37 +01:00 committed by Predrag Gruevski
parent 40af1490bc
commit 2b57dfc438
2 changed files with 6 additions and 2 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View file

@ -68,7 +68,11 @@ async function installRustUp(): Promise<void> {
// [TODO] Remove this temporary fix once the underlying issue is fixed.
if (os.platform() == "win32") {
exec.exec("mkdir C:\\Users\\runneradmin\\.cargo\\registry\\index");
try {
await exec.exec("mkdir C:\\Users\\runneradmin\\.cargo\\registry\\index");
} catch (error: any) {
core.info(`Failed to create registry index directory: ${error.message}`);
}
}
}