(app: Argv)
| 688 | // --- Yargs registration --- |
| 689 | |
| 690 | export function registerUpgradeCommand(app: Argv): void { |
| 691 | app.command( |
| 692 | 'upgrade', |
| 693 | 'Check for updates and upgrade XcodeBuildMCP', |
| 694 | (yargs) => |
| 695 | yargs |
| 696 | .option('check', { |
| 697 | type: 'boolean', |
| 698 | default: false, |
| 699 | describe: 'Check for updates without upgrading', |
| 700 | }) |
| 701 | .option('yes', { |
| 702 | type: 'boolean', |
| 703 | alias: 'y', |
| 704 | default: false, |
| 705 | describe: 'Skip confirmation and upgrade automatically', |
| 706 | }), |
| 707 | async (argv) => { |
| 708 | const exitCode = await runUpgradeCommand({ |
| 709 | check: argv.check as boolean, |
| 710 | yes: argv.yes as boolean, |
| 711 | }); |
| 712 | if (exitCode !== 0) { |
| 713 | process.exit(exitCode); |
| 714 | } |
| 715 | }, |
| 716 | ); |
| 717 | } |
no test coverage detected