🎥 Make videos programmatically with React
make it an error if you pass both
Jonny Burgerb557194029b9
diff --git a/packages/cli/src/user-passed-output-location.ts b/packages/cli/src/user-passed-output-location.tsindex bfd9b9f146..d6a26b84ad 100644--- a/packages/cli/src/user-passed-output-location.ts+++ b/packages/cli/src/user-passed-output-location.ts@@ -1,6 +1,5 @@import {ConfigInternals} from './config';import {getDefaultOutLocation} from './get-default-out-name';-import {Log} from './log';import {parsedCli} from './parse-command-line';export const getUserPassedOutputLocation = (args: string[]) => {@@ -21,10 +20,14 @@ export const getOutputLocation = ({args: string[];type: 'asset' | 'sequence';}) => {- if (typeof args[0] !== 'undefined' && typeof parsedCli.output !== 'undefined')- Log.warn(- 'You passed both an output flag (--output) and an output location as an argument. The output flag will be ignored.'+ if (+ typeof args[0] !== 'undefined' &&+ typeof parsedCli.output !== 'undefined'+ ) {+ throw new Error(+ 'You passed both an output flag (--output) and an output location as an positional argument. Choose only one of the ways.');+ }return (getUserPassedOutputLocation(args) ??diff --git a/packages/docs/docs/cli/render.md b/packages/docs/docs/cli/render.mdindex 0b53fc95ef..2aa882110d 100644--- a/packages/docs/docs/cli/render.md+++ b/packages/docs/docs/cli/render.md@@ -72,11 +72,7 @@ Renamed to `--jpeg-quality` in v4.0.0### `--output` <AvailableFrom v="4.0.0" />-Sets the output file path, similar to the `output-location` argument.--:::info-The `--output` flag is only used if no `output-location` argument is passed. If you pass an `output-location` argument, the `--output` flag will be ignored, and a warning will be printed.-:::+Sets the output file path, as an alternative to the `output-location` positional argument.### `--overwrite`diff --git a/packages/docs/docs/cli/still.md b/packages/docs/docs/cli/still.mdindex 957ed7b3b8..46f8bf2429 100644--- a/packages/docs/docs/cli/still.md+++ b/packages/docs/docs/cli/still.md@@ -48,6 +48,10 @@ Specify a location for a dotenv file - Default `.env`. [Read about how environmeRenamed to `--jpeg-quality` in v4.0.0+### `--output` <AvailableFrom v="4.0.0" />++Sets the output file path, as an alternative to the `output-location` positional argument.+### `--overwrite`[Write to output even if file already exists.](/docs/config#setoverwriteoutput). This flag is enabled by default, use `--overwrite=false` to disable it.