diff --git a/src/cli/replicate.ts b/src/cli/replicate.ts index 0ef616a..6139665 100644 --- a/src/cli/replicate.ts +++ b/src/cli/replicate.ts @@ -50,7 +50,15 @@ export default class Replicate extends Command { const { source, dest } = { ...proj, - ...(args as { + + // oclif does set undefined values for non-existant args + // so we have to filter out these values, or they will replace project config values + ...(Object.keys(args) + .filter((ak) => args[ak]) + .reduce((acc, curk) => { + acc[curk] = args[curk]; + return acc; + }, {} as { [k: string]: string }) as { source: string; dest?: string; }),