From f13d18d494f9501729517d97b4df59927d370052 Mon Sep 17 00:00:00 2001 From: Cory Miller <13227161+cory-miller@users.noreply.github.com> Date: Fri, 17 Feb 2023 18:36:02 +0000 Subject: [PATCH] lint fixes --- packages/io/src/io.ts | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/io/src/io.ts b/packages/io/src/io.ts index 8f481dd5..258b7e6d 100644 --- a/packages/io/src/io.ts +++ b/packages/io/src/io.ts @@ -4,7 +4,6 @@ import * as path from 'path' import {promisify} from 'util' import * as ioUtil from './io-util' -const exec = promisify(childProcess.exec) const execFile = promisify(childProcess.execFile) /** @@ -129,23 +128,31 @@ export async function rmRF(inputPath: string): Promise { try { const cmdPath = ioUtil.getCmdPath() - const p = new Promise(async (resolve, reject) => { + const p = new Promise(async resolve => { setTimeout(() => { - resolve("timeout") + resolve('timeout') }, 500) let result = null if (await ioUtil.isDirectory(inputPath, true)) { - result = childProcess.spawn(cmdPath, ['/s', '/c', '"rd /s /q "%inputPath%""'], { - env: {inputPath} - }) + result = childProcess.spawn( + cmdPath, + ['/s', '/c', '"rd /s /q "%inputPath%""'], + { + env: {inputPath} + } + ) } else { - result = childProcess.spawn('cmdPath', ['/s', '/c', '"del /f /a "%inputPath%""'], { - env: {inputPath} - }) + result = childProcess.spawn( + cmdPath, + ['/s', '/c', '"del /f /a "%inputPath%""'], + { + env: {inputPath} + } + ) } - result.on('close', (code) => { + result.on('close', code => { resolve(code) }) })