fix(cli): Check env for configDirectory.

This commit is contained in:
Gervwyk 2022-06-04 09:48:07 +03:00
parent 4c7897c9af
commit f8964cac1a

View File

@ -30,8 +30,9 @@ async function startUp({ context, options = {}, command }) {
context.command = command.name();
context.commandLineOptions = options;
context.print = createPrint();
context.configDirectory = path.resolve(options.configDirectory || process.cwd());
context.configDirectory = path.resolve(
options.configDirectory || process.env.LOWDEFY_DIRECTORY_CONFIG || process.cwd()
);
const { cliConfig, lowdefyVersion, plugins } = await getLowdefyYaml(context);
context.cliConfig = cliConfig;
context.lowdefyVersion = lowdefyVersion;