We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31866b6 commit 1e851c5Copy full SHA for 1e851c5
src/getAppRootPath.ts
@@ -3,9 +3,9 @@ import { existsSync } from "fs-extra"
3
import { realpathCwd } from "./realpathCwd"
4
5
export const getAppRootPath = (): string => {
6
- let cwd = realpathCwd().replace("\\", "/")
+ let cwd = realpathCwd().replace(/\\/g, "/")
7
while (!existsSync(join(cwd, "package.json"))) {
8
- const up = resolve(cwd, "../").replace("\\", "/")
+ const up = resolve(cwd, "../").replace(/\\/g, "/")
9
if (up === cwd) {
10
throw new Error("no package.json found for this project")
11
}
0 commit comments