Improve eject message (#3416)

* improve eject message

* cross os implementation
This commit is contained in:
Joe Lim
2017-11-07 10:37:40 -08:00
committed by Joe Haddad
parent 5b4ff563eb
commit 4bec877178

View File

@@ -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);
}