Skip to content

Commit

Permalink
Add more descriptive variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kemmerle committed Dec 17, 2024
1 parent 1b06e9c commit 3b63df8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,16 @@ const setRequestHeaders = () => {
addUserAgentHeader('HubSpot CLI', pkg.version);
};

const NO_VALIDATE_LIST = {
const NO_CONFIG_VALIDATION = {
init: { skip: true },
auth: { skip: true },
};

const loadConfigMiddleware = async options => {
const maybeValidateConfig = () => {
const shouldValidate = options._.every(
item => !(NO_VALIDATE_LIST[item] && NO_VALIDATE_LIST[item].skip)
command =>
!(NO_CONFIG_VALIDATION[command] && NO_CONFIG_VALIDATION[command].skip)
);
if (shouldValidate) {
if (!validateConfig()) {
Expand Down

0 comments on commit 3b63df8

Please sign in to comment.