From e9d3438387c7a5888148c370932258d476b618b0 Mon Sep 17 00:00:00 2001 From: shaanmugapriya Date: Mon, 12 Feb 2024 18:28:58 +0530 Subject: [PATCH] updated code --- src/setup-dotnet.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index edd9f96..51f521a 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -22,7 +22,7 @@ export type QualityOptions = (typeof qualityOptions)[number]; let cancelled = false; let errorOccurred = false; -let unsupportedPlatform = false; +const unsupportedPlatform = false; process.on('SIGINT', () => { cancelled = true; }); @@ -99,7 +99,6 @@ export async function run() { const cacheDependencyPath = core.getInput('cache-dependency-path'); await restoreCache(cacheDependencyPath); } - } catch (error) { core.setFailed(error.message); errorOccurred = true; @@ -121,8 +120,9 @@ export async function run() { directoryPath = 'Unsupported platform'; } if (!unsupportedPlatform && fs.existsSync(directoryPath)) { - fs.rmdirSync(directoryPath, { recursive: true }); + fs.rmdirSync(directoryPath, {recursive: true}); core.info(`Directory ${directoryPath} has been deleted.`); + } } } }