Skip to content

Commit

Permalink
#1273: disable wizard for wrong business unit if --skipInteraction is…
Browse files Browse the repository at this point in the history
… set
  • Loading branch information
JoernBerkefeld committed Apr 20, 2024
1 parent 9970a09 commit 3d6def6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/util/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,13 @@ const Cli = {
) {
// correct credential provided but BU still needed
if (businessUnit && businessUnit !== 'undefined') {
Util.logger.warn(
`Business Unit '${businessUnit}' not found for credential '${credential}'`
);
const msg = `Business Unit '${businessUnit}' not found for credential '${credential}'`;
if (Util.skipInteraction) {
throw new Error(msg);
}
Util.logger.warn(msg);
}

const response = await this._selectBU(properties, credential, null, allowAll);
businessUnit = response.businessUnit;
Util.logger.info(
Expand Down

0 comments on commit 3d6def6

Please sign in to comment.