fix(#1390): gateway uninstall headless — --yes/--remove-data; non-TTY without consent fails loud (#1422)
ci/woodpecker/push/publish Pipeline was canceled

Co-authored-by: ops-deploy-01 <[email protected]>
This commit was merged in pull request #1422.
This commit is contained in:
2026-08-25 16:00:17 +00:00
committed by ops-deploy-01
parent ae58482b72
commit 4e3d179e61
3 changed files with 148 additions and 15 deletions
+7 -2
View File
@@ -202,9 +202,14 @@ export function registerGatewayCommand(program: Command): void {
gw.command('uninstall')
.description('Uninstall the gateway daemon and optionally remove data')
.action(async () => {
.option(
'-y, --yes',
'Headless: skip the confirmation prompt (required when stdin is not a TTY)',
)
.option('--remove-data', 'Also remove all gateway data (never implied by --yes)')
.action(async (cmdOpts: { yes?: boolean; removeData?: boolean }) => {
const { runUninstall } = await import('./gateway/uninstall.js');
await runUninstall();
await runUninstall(cmdOpts);
});
// ─── doctor ─────────────────────────────────────────────────────────────────