From 7a5a1c3d423c041bf111e117a20389b3d9bd5372 Mon Sep 17 00:00:00 2001 From: Cory Miller <13227161+cory-miller@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:02:26 +0000 Subject: [PATCH] try inlining inputPath --- packages/io/src/io.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/io/src/io.ts b/packages/io/src/io.ts index 6dbf7a15..9ede784a 100644 --- a/packages/io/src/io.ts +++ b/packages/io/src/io.ts @@ -138,18 +138,12 @@ export async function rmRF(inputPath: string): Promise { if (await ioUtil.isDirectory(inputPath, true)) { result = childProcess.spawn( cmdPath, - ['/s', '/c', 'rd', '/s', '/q', '"%inputPath%"'], - { - env: {inputPath} - } + ['/s', '/c', 'rd', '/s', '/q', `"${inputPath}"`] ) } else { result = childProcess.spawn( cmdPath, - ['/s', '/c', 'del', '/f', '/q', '/a', '"%inputPath%"'], - { - env: {inputPath} - } + ['/s', '/c', 'del', '/f', '/q', '/a', `"${inputPath}"`] ) } @@ -162,7 +156,7 @@ export async function rmRF(inputPath: string): Promise { }) result.stderr?.on('data', data => { - console.log(`stdout: ${data}`) + console.log(`stderr: ${data}`) }) result.on('error', err => {