From 4bec877178ff918dbf1d255182c241a0cf93670e Mon Sep 17 00:00:00 2001
From: Joe Lim <xjlim@users.noreply.github.com>
Date: Tue, 7 Nov 2017 10:37:40 -0800
Subject: [PATCH] Improve eject message (#3416)

* improve eject message

* cross os implementation
---
 packages/react-scripts/scripts/eject.js | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js
index 2b859694f..c8438f5d1 100644
--- a/packages/react-scripts/scripts/eject.js
+++ b/packages/react-scripts/scripts/eject.js
@@ -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);
     }
-- 
GitLab