Skip to content

Commit

Permalink
Add config validation for backend.squash_merges option.
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Apr 29, 2018
1 parent db27590 commit 93d20cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/actions/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export function validateConfig(config) {
if (typeof config.getIn(['backend', 'name']) !== 'string') {
throw new Error("Error in configuration file: Your `backend.name` must be a string. Check your config.yml file.");
}
if (!isBoolean(config.getIn(['backend', 'squash_merges'], false))) {
throw new Error("Error in configuration file: Your `backend.squash_merges` must be a boolean. Check your config.yml file.");
}
if (!config.get('media_folder')) {
throw new Error("Error in configuration file: A `media_folder` wasn\'t found. Check your config.yml file.");
}
Expand Down

0 comments on commit 93d20cc

Please sign in to comment.