Skip to content

Commit

Permalink
added check for *nix because existsSync('/') lies
Browse files Browse the repository at this point in the history
  • Loading branch information
lucastheisen committed May 25, 2017
1 parent 6fa247a commit f7347b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/specs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function mock (fileName: string, data: any): void {
}

function clear (): void {
if (fs.existsSync(root)) {
if (root === '/' || fs.existsSync(root)) {
fs.readdirSync(root).forEach(dir => {
fs.rmdirSync(path.join(root, dir))
})
Expand Down

0 comments on commit f7347b6

Please sign in to comment.