Skip to content

Commit 0027ef2

Browse files
fix(schematics): warn when ng add setup runs with no features selected
Pressing Enter without toggling any checkbox at the features prompt silently exited with the CLI's stock "Nothing to be done." message, giving no indication that Space selects a feature. Print a warning explaining the checkbox controls and inviting a retry.
1 parent 62d3929 commit 0027ef2

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/schematics/setup/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ export const ngAddSetupProject = (
6262

6363
const features = await featuresPrompt();
6464

65-
if (features.length > 0) {
65+
if (features.length === 0) {
66+
context.logger.warn(
67+
'No features were selected, so there is nothing to set up. ' +
68+
'At the "What features would you like to setup?" prompt, use the arrow keys to move, ' +
69+
'press Space to select each feature you want, then Enter to confirm. ' +
70+
'Re-run ng add @angular/fire to try again.'
71+
);
72+
} else {
6673

6774
const firebaseTools = await getFirebaseTools();
6875

0 commit comments

Comments
 (0)