Skip to content

Commit 9658a8a

Browse files
kriszypclaude
andcommitted
fix(installer): warn when DEFAULTS_MODE is set to an unrecognized value (RE-6)
Previously, setting DEFAULTS_MODE=1 (or any value other than "dev") silently fell through to prod defaults — HTTPS-only, auth required — with no feedback. Now emits a yellow warning to stderr and the log before continuing so users know why dev mode was not applied. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a80d486 commit 9658a8a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

utility/install/installer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,12 @@ async function createConfigFile(installParams) {
527527
if (args[cfg.toLowerCase()] === undefined) args[cfg] = DEV_MODE_CONFIG[cfg];
528528
}
529529
} else {
530+
const defaultsMode = installParams[hdbTerms.INSTALL_PROMPTS.DEFAULTS_MODE];
531+
if (defaultsMode !== undefined && defaultsMode !== 'prod') {
532+
const warn = `DEFAULTS_MODE value "${defaultsMode}" is not recognized (expected "dev" or "prod"). Using prod defaults.`;
533+
console.error(chalk.yellow.bold(`Warning: ${warn}`));
534+
hdbLogger.warn(warn);
535+
}
530536
if (args[CONFIG_PARAMS.OPERATIONSAPI_NETWORK_PORT.toLowerCase()])
531537
args[CONFIG_PARAMS.OPERATIONSAPI_NETWORK_SECUREPORT] = null;
532538
if (args[CONFIG_PARAMS.HTTP_PORT.toLowerCase()]) args[CONFIG_PARAMS.HTTP_SECUREPORT] = null;

0 commit comments

Comments
 (0)