Skip to content

🎥 Make videos programmatically with React

add a warning when executing command from outside root directory

Jonny Burgerf4b84d21be62
diff --git a/packages/cli/src/initialize-render-cli.ts b/packages/cli/src/initialize-render-cli.ts
index 6284cf0a28..212f6c6841 100644
--- a/packages/cli/src/initialize-render-cli.ts
+++ b/packages/cli/src/initialize-render-cli.ts
@@ -12,6 +12,12 @@ export const initializeRenderCli = async (
// Only now Log.verbose is available
Log.verbose('Remotion root directory:', remotionRoot);
+ if (remotionRoot !== process.cwd()) {
+ Log.warn(
+ `Warning: The root directory of your project is ${remotionRoot}, but you are executing this command from ${process.cwd()}. The recommendation is to execute commands from the root directory.`
+ );
+ }
+
if (appliedName) {
Log.verbose(`Applied configuration from ${appliedName}.`);
} else {