Skip to content

Commit 1e851c5

Browse files
authored
fix replace backslashes to slashes
1 parent 31866b6 commit 1e851c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/getAppRootPath.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { existsSync } from "fs-extra"
33
import { realpathCwd } from "./realpathCwd"
44

55
export const getAppRootPath = (): string => {
6-
let cwd = realpathCwd().replace("\\", "/")
6+
let cwd = realpathCwd().replace(/\\/g, "/")
77
while (!existsSync(join(cwd, "package.json"))) {
8-
const up = resolve(cwd, "../").replace("\\", "/")
8+
const up = resolve(cwd, "../").replace(/\\/g, "/")
99
if (up === cwd) {
1010
throw new Error("no package.json found for this project")
1111
}

0 commit comments

Comments
 (0)