Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b5d6a0

Browse files
committed
fix: should throw error when an internal error is encountered
Also fix the bug that no interactive prompt is provided,result.projectName would be undefined and cause an error.
1 parent313847d commit0b5d6a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ async function init() {
386386
// so we still have to assign the default values here
387387
const{
388388
projectName,
389-
packageName=projectName.trim()||defaultProjectName,
389+
packageName=projectName?.trim()||defaultProjectName,
390390
shouldOverwrite=argv.forceasboolean,
391391
needsJsx=argv.jsxasboolean,
392392
needsTypeScript=(argv.ts||argv.typescript)asboolean,
@@ -707,4 +707,5 @@ async function init() {
707707

708708
init().catch((e)=>{
709709
console.error(e)
710+
process.exit(1)
710711
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp