Skip to content

🎥 Make videos programmatically with React

Update entry-point.ts

Jonny Burger3704c10ac2b0
diff --git a/packages/cli/src/entry-point.ts b/packages/cli/src/entry-point.ts
index 498849161e..951ef806a8 100644
--- a/packages/cli/src/entry-point.ts
+++ b/packages/cli/src/entry-point.ts
@@ -30,7 +30,8 @@ export const findEntryPoint = (
let file: string | null = args[0];
if (file) {
Log.verbose('Checking if', file, 'is the entry file');
- if (existsSync(path.resolve(remotionRoot, file))) {
+ // Intentionally resolving CLI files to CWD, while resolving config file to remotionRoot
+ if (existsSync(path.resolve(process.cwd(), file))) {
return {file, remainingArgs: args.slice(1), reason: 'argument passed'};
}
}