From 872883ab23acea24c5fee1440634fb2385091e56 Mon Sep 17 00:00:00 2001 From: Aditya Mankal <137275420+AdityaMankal-MS@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:34:31 +0530 Subject: [PATCH] Fix CodeQL Issues (#1084) --- node/task.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/task.ts b/node/task.ts index 80c1d3543..7c11beb9a 100644 --- a/node/task.ts +++ b/node/task.ts @@ -1435,11 +1435,11 @@ export function rmRF(inputPath: string): void { try { if (fs.statSync(inputPath).isDirectory()) { debug('removing directory ' + inputPath); - childProcess.execSync(`rd /s /q "${inputPath}"`); + childProcess.execFileSync("cmd.exe", ["/c", "rd", "/s", "/q", inputPath]); } else { debug('removing file ' + inputPath); - childProcess.execSync(`del /f /a "${inputPath}"`); + childProcess.execFileSync("cmd.exe", ["/c", "del", "/f", "/a", inputPath]); } } catch (err) {