From 4d807985ec3ce8bc07f2b4a349f16d2b3cf97994 Mon Sep 17 00:00:00 2001 From: Cory Miller <13227161+cory-miller@users.noreply.github.com> Date: Tue, 21 Feb 2023 18:44:45 +0000 Subject: [PATCH] . --- packages/io/src/io.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/io/src/io.ts b/packages/io/src/io.ts index 1b6cd88a..6d411359 100644 --- a/packages/io/src/io.ts +++ b/packages/io/src/io.ts @@ -127,6 +127,7 @@ export async function rmRF(inputPath: string): Promise { } try { + console.log('a') await ioUtil.rm(inputPath, { force: true, maxRetries: 3, @@ -193,15 +194,19 @@ export async function rmRF(inputPath: string): Promise { } catch (err) { // if you try to delete a file that doesn't exist, desired result is achieved // other errors are valid + console.log('b') if (err.code !== 'ENOENT') throw err } // Shelling out fails to remove a symlink folder with missing source, this unlink catches that try { + console.log('c') if (await ioUtil.exists(inputPath)) { + console.log('d') await ioUtil.unlink(inputPath) } } catch (err) { + console.log('e') // if you try to delete a file that doesn't exist, desired result is achieved // other errors are valid if (err.code !== 'ENOENT' || err.code !== 'EPERM') throw err