mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
updated code
This commit is contained in:
parent
66808a5f19
commit
e9d3438387
@ -22,7 +22,7 @@ export type QualityOptions = (typeof qualityOptions)[number];
|
|||||||
|
|
||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
let errorOccurred = false;
|
let errorOccurred = false;
|
||||||
let unsupportedPlatform = false;
|
const unsupportedPlatform = false;
|
||||||
process.on('SIGINT', () => {
|
process.on('SIGINT', () => {
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
});
|
});
|
||||||
@ -99,7 +99,6 @@ export async function run() {
|
|||||||
const cacheDependencyPath = core.getInput('cache-dependency-path');
|
const cacheDependencyPath = core.getInput('cache-dependency-path');
|
||||||
await restoreCache(cacheDependencyPath);
|
await restoreCache(cacheDependencyPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
errorOccurred = true;
|
errorOccurred = true;
|
||||||
@ -121,8 +120,9 @@ export async function run() {
|
|||||||
directoryPath = 'Unsupported platform';
|
directoryPath = 'Unsupported platform';
|
||||||
}
|
}
|
||||||
if (!unsupportedPlatform && fs.existsSync(directoryPath)) {
|
if (!unsupportedPlatform && fs.existsSync(directoryPath)) {
|
||||||
fs.rmdirSync(directoryPath, { recursive: true });
|
fs.rmdirSync(directoryPath, {recursive: true});
|
||||||
core.info(`Directory ${directoryPath} has been deleted.`);
|
core.info(`Directory ${directoryPath} has been deleted.`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user