Skip to content

🎥 Make videos programmatically with React

load config file from `remotion lambda` cli command

Jonny Burgere14cf1dd8e32
diff --git a/packages/cli/src/lambda-command.ts b/packages/cli/src/lambda-command.ts
index 58b7ea280b..47b333fc50 100644
--- a/packages/cli/src/lambda-command.ts
+++ b/packages/cli/src/lambda-command.ts
@@ -1,5 +1,6 @@
+import {loadConfig} from './get-config-file-name';
import {Log} from './log';
-import {parsedCli} from './parse-command-line';
+import {parseCommandLine, parsedCli} from './parse-command-line';
export const lambdaCommand = async () => {
try {
@@ -7,6 +8,14 @@ export const lambdaCommand = async () => {
paths: [process.cwd()],
});
const {LambdaInternals} = require(path);
+ parseCommandLine();
+ const appliedName = loadConfig();
+ if (appliedName) {
+ Log.verbose(`Applied configuration from ${appliedName}.`);
+ } else {
+ Log.verbose('No config file loaded.');
+ }
+
await LambdaInternals.executeCommand(parsedCli._.slice(1));
process.exit(0);
} catch (err) {