Skip to content

Commit 7df5167

Browse files
fix: exit program on cancel
1 parent bf6ba79 commit 7df5167

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/create-lang/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ function askConfiguration() {
6262
message: 'Include gitignore and npm publish files?',
6363
initial: true,
6464
}
65-
])
65+
], {
66+
onCancel: () => {
67+
process.exit(1)
68+
}
69+
})
6670
}
6771

6872
type Answers = Awaited<ReturnType<typeof askConfiguration>>
@@ -125,4 +129,3 @@ async function main() {
125129
}
126130

127131
main()
128-

0 commit comments

Comments
 (0)