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) {