Skip to content

Commit 1c66484

Browse files
committed
fix(store): fix the bug for create dir outside
1 parent 465f345 commit 1c66484

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

common/utils/file/getRootPath.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import path from 'node:path'
22
import { __dirname } from '#common/utils/file/getDirname.js'
33
import { currentEnv } from '#common/utils/etc/checkEnv.js'
4-
import { PackageName } from '#common/constants/question.const.js'
5-
4+
// 在cli环境下 执行目录为 bin 目录 根目录就是上一层目录
65
export const rootPath =
76
currentEnv() === 'project'
87
? path.dirname(path.dirname(path.dirname(__dirname)))
9-
: path.join(path.dirname(__dirname), PackageName)
8+
: path.dirname(__dirname)

0 commit comments

Comments
 (0)