Skip to content

🎥 Make videos programmatically with React

Fix bundle-cache: register as boolean flag with null default

Jonny Burger46aca612df22
diff --git a/packages/cli/src/parsed-cli.ts b/packages/cli/src/parsed-cli.ts
index 7643b86738..a454c84f84 100644
--- a/packages/cli/src/parsed-cli.ts
+++ b/packages/cli/src/parsed-cli.ts
@@ -38,12 +38,14 @@ export const BooleanFlags = [
'onlyAllocateCpuDuringRequestProcessing',
BrowserSafeApis.options.isProductionOption.cliFlag,
BrowserSafeApis.options.forceNewStudioOption.cliFlag,
+ BrowserSafeApis.options.bundleCacheOption.cliFlag,
];
export const parsedCli = minimist<CommandLineOptions>(process.argv.slice(2), {
boolean: BooleanFlags,
default: {
overwrite: true,
+ [BrowserSafeApis.options.bundleCacheOption.cliFlag]: null,
muted: null,
},
}) as CommandLineOptions & {
diff --git a/packages/renderer/src/options/bundle-cache.tsx b/packages/renderer/src/options/bundle-cache.tsx
index 575df3cbf6..22301c6474 100644
--- a/packages/renderer/src/options/bundle-cache.tsx
+++ b/packages/renderer/src/options/bundle-cache.tsx
@@ -16,10 +16,10 @@ export const bundleCacheOption = {
ssrName: null,
docLink: 'https://www.remotion.dev/docs/config#setcachingenabled',
getValue: ({commandLine}) => {
- if (commandLine[cliFlag] !== undefined) {
+ if (commandLine[cliFlag] !== undefined && commandLine[cliFlag] !== null) {
return {
source: 'cli',
- value: commandLine[cliFlag] !== 'false',
+ value: Boolean(commandLine[cliFlag]),
};
}