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 Timer committed Nov 7, 2017
1 parent e5e235a commit b189608
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions 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 b189608

Please sign in to comment.