Skip to content

Commit

Permalink
Improve eject message (facebook#3416)
Browse files Browse the repository at this point in the history
* improve eject message

* cross os implementation
  • Loading branch information
xjlim authored and Pavel Zhytko committed Jul 10, 2018
1 parent 216c50f commit f559382
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/react-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,17 @@ inquirer
if (gitStatus) {
console.error(
chalk.red(
`This git repository has untracked files or uncommitted changes:\n\n` +
gitStatus.split('\n').map(line => ' ' + line) +
'\n\n' +
'This git repository has untracked files or uncommitted changes:'
) +
'\n\n' +
gitStatus
.split('\n')
.map(line => line.match(/ .*/g)[0].trim())
.join('\n') +
'\n\n' +
chalk.red(
'Remove untracked files, stash or commit any changes, and try again.'
)
)
);
process.exit(1);
}
Expand Down

0 comments on commit f559382

Please sign in to comment.