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,