Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #606 from Financial-Times/CPP-249-configure-error
Browse files Browse the repository at this point in the history
CPP-249 -  unclear errors thrown by `nht configure`
  • Loading branch information
emortong authored Aug 24, 2020
2 parents 7012593 + dac83c8 commit 7b66bd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tasks/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ async function task (opts) {
}
});

const invalidVariables = Object.keys(patch).filter(prop => patch[prop] === '' || typeof patch[prop] === 'number');
if (invalidVariables.length > 0) {
throw new Error(`Variable values cannot be empty strings or numbers, please fix the following variables in the Vault UI: ${invalidVariables.join(', ')}`);
}

console.log('Setting config vars', Object.keys(patch)); // eslint-disable-line no-console

await herokuConfigVars.set(patch);
Expand Down

0 comments on commit 7b66bd8

Please sign in to comment.