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 placenamehere committed Nov 30, 2017
1 parent 2a066eb commit 15c014e
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 15c014e

Please sign in to comment.