Skip to content

Commit

Permalink
Merge pull request #57 from storybookjs/fix/better-eject-error-message
Browse files Browse the repository at this point in the history
fix: add  file location to eject error message
  • Loading branch information
yannbf committed Feb 17, 2022
2 parents e0be3b1 + 804a6de commit de628da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/test-storybook.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ function ejectConfiguration () {
const fileAlreadyExists = fs.existsSync(destination)

if(fileAlreadyExists) {
throw new Error('Found existing file. Please delete it and rerun this command')
throw new Error(dedent`Found existing file at:
${destination}
Please delete it and rerun this command.
\n`)
}

fs.copyFileSync(origin, destination)
Expand Down

0 comments on commit de628da

Please sign in to comment.