Skip to content

Commit 34ace26

Browse files
ohroyjmpecxtypicode
authored
fix: fix init not work on pnpm #1334 (#1347)
* fix: fix init not work on pnpm #1334 * doc: pnpm users must run init on project root * Update bin.js * Update bin.js * Update get-started.md --------- Co-authored-by: 键来! <jmpecx@outlook.com> Co-authored-by: typicode <typicode@gmail.com>
1 parent f874dfb commit 34ace26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import i from './index.js'
55
let a = process.argv[2]
66

77
if (a == 'init') {
8-
let p = process.env.npm_package_json
8+
let p = 'package.json'
99
let d = JSON.parse(f.readFileSync(p))
1010
(d.scripts ||= {}).prepare = 'husky'
1111
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')

0 commit comments

Comments
 (0)