We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5dd32e9 commit 7254f29Copy full SHA for 7254f29
common/utils/file/getRootPath.js
@@ -1,9 +1,8 @@
1
import path from 'node:path'
2
import { __dirname } from '#common/utils/file/getDirname.js'
3
import { currentEnv } from '#common/utils/etc/checkEnv.js'
4
-import { PackageName } from '#common/constants/question.const.js'
5
-
+// 在cli环境下 执行目录为 bin 目录 根目录就是上一层目录
6
export const rootPath =
7
currentEnv() === 'project'
8
? path.dirname(path.dirname(path.dirname(__dirname)))
9
- : path.join(path.dirname(__dirname), PackageName)
+ : path.dirname(__dirname)
0 commit comments