Skip to content

Commit 18448ed

Browse files
committed
fix(ng-dev): remove requirement for caretaker config to exist for ng-dev caretaker subcommands
1 parent 2657795 commit 18448ed

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

ng-dev/caretaker/cli.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,12 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {info} from 'console';
109
import {Argv} from 'yargs';
11-
import {assertValidCaretakerConfig, assertValidGithubConfig, getConfig} from '../utils/config.js';
1210
import {CheckModule} from './check/cli.js';
1311
import {HandoffModule} from './handoff/cli.js';
1412
import {MergeModeModule} from './merge-mode/cli.js';
1513

1614
/** Build the parser for the caretaker commands. */
1715
export function buildCaretakerParser(argv: Argv) {
18-
return argv
19-
.middleware(caretakerCommandCanRun, false)
20-
.command(MergeModeModule)
21-
.command(CheckModule)
22-
.command(HandoffModule);
23-
}
24-
25-
function caretakerCommandCanRun() {
26-
try {
27-
getConfig([assertValidCaretakerConfig, assertValidGithubConfig]);
28-
} catch {
29-
info('The `caretaker` command is not enabled in this repository.');
30-
info(` To enable it, provide a caretaker config in the repository's .ng-dev/ directory`);
31-
process.exit(1);
32-
}
16+
return argv.command(MergeModeModule).command(CheckModule).command(HandoffModule);
3317
}

0 commit comments

Comments
 (0)