From 683cee159e63dcc9335fce81e69c25431dd79d8c Mon Sep 17 00:00:00 2001 From: Cory Miller <13227161+cory-miller@users.noreply.github.com> Date: Tue, 21 Feb 2023 20:00:47 +0000 Subject: [PATCH] . --- packages/io/__tests__/io.test.ts | 3 ++- packages/io/src/io-util.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/io/__tests__/io.test.ts b/packages/io/__tests__/io.test.ts index a74d0a6a..33873054 100644 --- a/packages/io/__tests__/io.test.ts +++ b/packages/io/__tests__/io.test.ts @@ -348,7 +348,8 @@ describe('rmRF', () => { // can't remove folder with locked file on windows if (ioUtil.IS_WINDOWS) { - await assertExists(testPath) + // additionally, can't stat an open file on Windows without getting EPERM + await ioUtil.access(filePath) } else { await assertNotExists(testPath) } diff --git a/packages/io/src/io-util.ts b/packages/io/src/io-util.ts index 49ced213..19066319 100644 --- a/packages/io/src/io-util.ts +++ b/packages/io/src/io-util.ts @@ -2,6 +2,7 @@ import * as fs from 'fs' import * as path from 'path' export const { + access, chmod, copyFile, lstat,