Skip to content

Commit 49dc63d

Browse files
committedApr 4, 2022
fix(@angular/cli): ensure lint command auto-add exits after completion
When no lint target is present for a project, the command will ask if linting should be added to the project. However, after adding the package, the command incorrectly kept executing and then failing due to the lint command not being fully setup yet. Instead, the command will now exit after adding the linting package. This also allows inspection and/or adjustment of the linting configuration prior to actually linting. Fixes: #22937
1 parent bbe74b8 commit 49dc63d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎packages/angular/cli/commands/lint-impl.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ export class LintCommand extends ArchitectCommand<LintCommandSchema> {
5050
if (error) {
5151
throw error;
5252
}
53-
54-
return status ?? 0;
5553
}
54+
55+
// Return an exit code to force the command to exit after adding the package
56+
return 1;
5657
}
5758
}

0 commit comments

Comments
 (0)
Please sign in to comment.