Skip to content

Commit

Permalink
Empty answer to crash the init. Added validation
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelrrc committed Jun 10, 2019
1 parent 38b5d76 commit 8521882
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/flows/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const askQuestions = async ({ prompt }, options) => {
initial: options.githubOrg,
skip: () => options.githubOrg,
name: 'githubOrg',
message: 'Your github organization?'
message: 'Your github organization?',
validate(value = '') {
return value === '' ? `Your github organization can't be empty` : true
},
}
const askProject = {
type: 'input',
Expand Down

0 comments on commit 8521882

Please sign in to comment.