Skip to content

Commit

Permalink
Fix env maintenance prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
2can committed Oct 6, 2023
1 parent 29ce4d9 commit dd7059d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/cli/env/maintenance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,20 @@ export const handler = async (argv: Arguments<EnvironmentMaintenance>) => {
}

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 (
Expand Down

0 comments on commit dd7059d

Please sign in to comment.