From dd7059d0c2668ca559a818c7a70c604b87ff25ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Wiaduch?= Date: Fri, 6 Oct 2023 13:07:02 +0200 Subject: [PATCH] Fix `env maintenance` prompt --- src/cli/env/maintenance.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cli/env/maintenance.ts b/src/cli/env/maintenance.ts index 8c2fdd8..edf006c 100644 --- a/src/cli/env/maintenance.ts +++ b/src/cli/env/maintenance.ts @@ -51,18 +51,20 @@ export const handler = async (argv: Arguments) => { } const { maintenanceMode } = await Enquirer.prompt<{ - maintenanceMode: boolean; + maintenanceMode: string; }>({ type: 'select', name: 'maintenanceMode', choices: [ - { message: 'disable maintenance mode', name: '', value: false }, - { message: 'enable maintenance mode', name: 'true', value: true }, + { message: 'disable maintenance mode', name: 'disable' }, + { message: 'enable maintenance mode', name: 'enable' }, ], message: 'Choose an option', }); - await updateEnvironment(argv, { maintenance_mode: Boolean(maintenanceMode) }); + await updateEnvironment(argv, { + maintenance_mode: maintenanceMode === 'enable', + }); }; const updateEnvironment = async (