simplify installer and remove parsing from read config

This commit is contained in:
miloschwartz 2025-06-21 16:35:22 -04:00
parent 9f38ad9b4d
commit ead5df0a8c
No known key found for this signature in database
9 changed files with 51 additions and 70 deletions

View file

@ -233,24 +233,11 @@ export function readConfigFile() {
environment = loadConfig(configFilePath2);
}
if (process.env.APP_BASE_DOMAIN) {
console.log(
"You're using deprecated environment variables. Transition to the configuration file. https://docs.fossorial.io/"
);
}
if (!environment) {
throw new Error(
"No configuration file found. Please create one. https://docs.fossorial.io/"
);
}
const parsedConfig = configSchema.safeParse(environment);
if (!parsedConfig.success) {
const errors = fromError(parsedConfig.error);
throw new Error(`Invalid configuration file: ${errors}`);
}
return parsedConfig.data;
return environment;
}