Skip to content

Commit aaeeef0

Browse files
authored
Use remove
1 parent eb41ff6 commit aaeeef0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/createTmpAsset.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55
import * as tmp from 'tmp';
6-
import { rmdir } from 'fs-extra';
6+
import { remove } from 'fs-extra';
77
import { NestedError } from './nestedError';
88

99
export async function CreateTmpFile(): Promise<TmpAsset> {
@@ -43,7 +43,7 @@ export async function CreateTmpDir(unsafeCleanup: boolean): Promise<TmpAsset> {
4343
name: tmpDir.name,
4444
dispose: () => {
4545
if (unsafeCleanup) {
46-
rmdir(tmpDir.name).catch((rejectReason) => {
46+
remove(tmpDir.name).catch((rejectReason) => {
4747
throw new Error(`Failed to cleanup ${tmpDir.name} at ${tmpDir.fd}: ${rejectReason}`);
4848
}); //to delete directories that have folders inside them
4949
} else {

0 commit comments

Comments
 (0)