File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.io/license
77 */
88
9- import { info } from 'console' ;
109import { Argv } from 'yargs' ;
11- import { assertValidCaretakerConfig , assertValidGithubConfig , getConfig } from '../utils/config.js' ;
1210import { CheckModule } from './check/cli.js' ;
1311import { HandoffModule } from './handoff/cli.js' ;
1412import { MergeModeModule } from './merge-mode/cli.js' ;
1513
1614/** Build the parser for the caretaker commands. */
1715export 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}
You can’t perform that action at this time.
0 commit comments