Merge pull request #1223 from lowdefy/cli-fix

fix(cli): Check env for configDirectory.
This commit is contained in:
Sam 2022-06-07 14:07:03 +02:00 committed by GitHub
commit d570f4cc12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;