Skip to content

Commit 738976a

Browse files
committed
fix cleaning script by resolving directory names
1 parent dbf59b1 commit 738976a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

scripts/clean.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env -S node --import tsx
2-
32
import { rmSync } from "fs";
3+
import { resolve } from "path";
44

55
/*
66
Some operating systems do not have the ability to perform
7-
rm -rf ... (example: Windows)
7+
rm -rf ... (example: Windows) if this is not the case, use the
8+
rm command.
89
*/
910

10-
rmSync('lib', {'force':true, 'recursive':true})
11-
rmSync('test/tmp', {'force':true, 'recursive':true})
11+
rmSync(resolve(__dirname, '../lib'), {'force':true, 'recursive':true});
12+
rmSync(resolve(__dirname, '../test/tmp'), {'force':true, 'recursive':true});

0 commit comments

Comments
 (0)