Skip to content

Commit

Permalink
Delete loadAndValidateOptions util
Browse files Browse the repository at this point in the history
  • Loading branch information
kemmerle committed Dec 20, 2024
1 parent dccf72f commit 659c383
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lib/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,8 @@ const {
getExt,
} = require('@hubspot/local-dev-lib/path');
const { getAccountId, getCmsPublishMode } = require('./commonOpts');
const { EXIT_CODES } = require('./enums/exitCodes');
const { logError } = require('./errorHandlers/index');

async function loadAndValidateOptions(options, shouldValidateAccount = true) {
let validAccount = true;
if (shouldValidateAccount) {
validAccount = await validateAccount(options);
}

if (!validAccount) {
process.exit(EXIT_CODES.ERROR);
}
}

/**
* Validate that an account was passed to the command and that the account's configuration is valid
*
Expand Down Expand Up @@ -227,5 +215,4 @@ module.exports = {
validateAccount,
checkAndConvertToJson,
fileExists,
loadAndValidateOptions,
};

0 comments on commit 659c383

Please sign in to comment.