config-loader: remove deprecated env check

This commit is contained in:
Patrik Oldsberg
2021-01-24 01:07:28 +01:00
parent f79938abe6
commit c87a6bfeff
+2 -12
View File
@@ -32,8 +32,8 @@ export type LoadConfigOptions = {
// Absolute paths to load config files from. Configs from earlier paths have lower priority.
configPaths: string[];
// TODO(Rugvip): This will be removed in the future, but for now we use it to warn about possible mistakes.
env: string;
/** @deprecated This option has been removed */
env?: string;
};
export async function loadConfig(
@@ -52,16 +52,6 @@ export async function loadConfig(
if (await fs.pathExists(localConfig)) {
configPaths.push(localConfig);
}
const envFile = `app-config.${options.env}.yaml`;
if (await fs.pathExists(resolvePath(configRoot, envFile))) {
console.error(
`Env config file '${envFile}' is not loaded as APP_ENV and NODE_ENV-based config loading has been removed`,
);
console.error(
`To load the config file, use --config <path>, listing every config file that you want to load`,
);
}
}
const env = async (name: string) => process.env[name];