From 17bd5c18e9c88e5abbef9b6732fad1a6f227d75e Mon Sep 17 00:00:00 2001 From: Vallie Joseph Date: Mon, 12 Dec 2022 05:05:46 +0000 Subject: [PATCH] adding windows verbatim args --- packages/io/src/io.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/io/src/io.ts b/packages/io/src/io.ts index a6c31ab6..b5e9fd72 100644 --- a/packages/io/src/io.ts +++ b/packages/io/src/io.ts @@ -4,7 +4,8 @@ import * as path from 'path' import {promisify} from 'util' import * as ioUtil from './io-util' -const exec = promisify(childProcess.exec) +// const exec = promisify(childProcess.exec) +// const fork = promisify(childProcess.fork) const execFile = promisify(childProcess.execFile) /** @@ -129,12 +130,14 @@ export async function rmRF(inputPath: string): Promise { try { const cmdPath = ioUtil.getCmdPath() if (await ioUtil.isDirectory(inputPath, true)) { - await exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { - env: {inputPath} + await execFile(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { + env: {inputPath}, + windowsVerbatimArguments: true }) } else { - await exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { - env: {inputPath} + await execFile(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { + env: {inputPath}, + windowsVerbatimArguments: true }) } } catch (err) {