Skip to content

Commit

Permalink
fix(gatsby-cli): added effective condition to check empty path (#17482)
Browse files Browse the repository at this point in the history
  • Loading branch information
anikethsaha authored and wardpeet committed Sep 9, 2019
1 parent 2eda97e commit 693fa58
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/gatsby-cli/src/init-starter.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ const getPaths = async (starterPath: string, rootPath: string) => {
},
])
// exit gracefully if responses aren't provided
if (!response.starter || !response.path) {
process.exit()
if (!response.starter || !response.path.trim()) {
throw new Error(
`Please mention both starter package and project name along with path(if its not in the root)`
)
}

selectedOtherStarter = response.starter === `different`
Expand Down

0 comments on commit 693fa58

Please sign in to comment.