Skip to content

Commit 693fa58

Browse files
anikethsahawardpeet
authored andcommitted
fix(gatsby-cli): added effective condition to check empty path (#17482)
1 parent 2eda97e commit 693fa58

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/gatsby-cli/src/init-starter.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,10 @@ const getPaths = async (starterPath: string, rootPath: string) => {
206206
},
207207
])
208208
// exit gracefully if responses aren't provided
209-
if (!response.starter || !response.path) {
210-
process.exit()
209+
if (!response.starter || !response.path.trim()) {
210+
throw new Error(
211+
`Please mention both starter package and project name along with path(if its not in the root)`
212+
)
211213
}
212214

213215
selectedOtherStarter = response.starter === `different`

0 commit comments

Comments
 (0)