From 6a357de3425afefd94f52f586ba0ca1c0174b9ae Mon Sep 17 00:00:00 2001 From: Cory Miller <13227161+cory-miller@users.noreply.github.com> Date: Fri, 17 Feb 2023 20:30:21 +0000 Subject: [PATCH] await on exists --- packages/io/src/io.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/io/src/io.ts b/packages/io/src/io.ts index 81213712..7f874035 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) /** @@ -167,7 +166,7 @@ export async function rmRF(inputPath: string): Promise { console.log('b') // Shelling out fails to remove a symlink folder with missing source, this unlink catches that try { - if (ioUtil.exists(inputPath)) { + if (await ioUtil.exists(inputPath)) { await ioUtil.unlink(inputPath) } } catch (err) {