fix: rebuild errors on windows (#692)

This commit is contained in:
kabirgh authored and GitHub committed 2024-01-15 08:39:16 -08:00
1 parent f36376503a
commit 8eec47c340
4 files changed
+27 -5

No files matched your search

+9
View File
@@ -3,6 +3,7 @@ import chalk from "chalk"
import { contentCacheFolder } from "./constants.js"
import { spawnSync } from "child_process"
import fs from "fs"
import { rimraf } from "rimraf"
export function escapePath(fp) {
return fp
@@ -52,3 +53,11 @@ export async function popContentFolder(contentFolder) {
})
await fs.promises.rm(contentCacheFolder, { force: true, recursive: true })
}
export async function rmrf(path) {
if (os.platform() == "win32") {
return rimraf.windows(path)
} else {
return rimraf(path)
}
}