Skip to content

Commit

Permalink
#1272: prioritize --metadata over old type/key parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Apr 19, 2024
1 parent e66fdcd commit d947cde
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ yargs(hideBin(process.argv))
},
handler: (argv) => {
Mcdev.setOptions(argv);
Mcdev.retrieve(
argv.BU,
csvToArray(argv.TYPE) || metadataToTypeKey(argv.metadata),
csvToArray(argv.KEY)
);
const typeKeyCombo = metadataToTypeKey(argv.metadata);
if ('undefined' === typeof typeKeyCombo) {
console.log('type/key');
Mcdev.retrieve(argv.BU, csvToArray(argv.TYPE), csvToArray(argv.KEY));
} else {
console.log('typeKeyCombo', typeKeyCombo);
Mcdev.retrieve(argv.BU, typeKeyCombo);
}
},
})
// @ts-expect-error
Expand Down

0 comments on commit d947cde

Please sign in to comment.