Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
improve eject message
  • Loading branch information
xjlim committed Nov 6, 2017
commit 6fd044ccba49ec7871f478b1c47c0b76d004b96a
13 changes: 8 additions & 5 deletions packages/react-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const cyan = chalk.cyan;

function getGitStatus() {
try {
let stdout = execSync(`git status --porcelain`, {
let stdout = execSync(`git status --porcelain | awk '{print $2}'`, {
stdio: ['pipe', 'pipe', 'ignore'],
}).toString();
return stdout.trim();
Expand All @@ -54,11 +54,14 @@ 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 +
'\n\n' +
chalk.red(
'Remove untracked files, stash or commit any changes, and try again.'
)
)
);
process.exit(1);
}
Expand Down