Skip to content

Commit f9f6956

Browse files
committed
fix(core): Exit with error when generator options not properly parsed
1 parent b314dd1 commit f9f6956

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/nx/src/utils/params.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,14 @@ async function promptForValues(
922922
.prompt(getPromptsForSchema(opts, schema, projectsConfigurations))
923923
.then((values) => ({ ...opts, ...values }))
924924
.catch((e) => {
925-
console.error(e);
926-
process.exit(0);
925+
console.error(
926+
`Could not properly parse prompts. Error:\n${JSON.stringify(
927+
e,
928+
null,
929+
2
930+
)}`
931+
);
932+
process.exit(1);
927933
});
928934
}
929935

0 commit comments

Comments
 (0)