fix for using project config for positional args
This commit is contained in:
parent
b41908f40d
commit
9cc044e6e0
|
@ -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;
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue