From 052fcdd986d13256e88ee8dc20a5dcf8e0e47fe9 Mon Sep 17 00:00:00 2001
From: Geoff Davis <geoffdavis92@users.noreply.github.com>
Date: Sun, 12 Mar 2017 10:13:41 -0500
Subject: [PATCH] Suggest "yarn build" rather than "yarn run build" (#1800)

* Fix for issue #1798: Suggested 'yarn build' versus 'yarn run build'

* remove 'run' from 'yarn test' command as well

* conditionally show 'run' if Yarn is not available
---
 packages/react-scripts/scripts/init.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js
index b8a820c82..9e2ea5cdc 100644
--- a/packages/react-scripts/scripts/init.js
+++ b/packages/react-scripts/scripts/init.js
@@ -149,13 +149,17 @@ module.exports = function(
   console.log(chalk.cyan(`  ${displayedCommand} start`));
   console.log('    Starts the development server.');
   console.log();
-  console.log(chalk.cyan(`  ${displayedCommand} run build`));
+  console.log(
+    chalk.cyan(`  ${displayedCommand} ${useYarn ? '' : 'run '}build`)
+  );
   console.log('    Bundles the app into static files for production.');
   console.log();
   console.log(chalk.cyan(`  ${displayedCommand} test`));
   console.log('    Starts the test runner.');
   console.log();
-  console.log(chalk.cyan(`  ${displayedCommand} run eject`));
+  console.log(
+    chalk.cyan(`  ${displayedCommand} ${useYarn ? '' : 'run '}eject`)
+  );
   console.log(
     '    Removes this tool and copies build dependencies, configuration files'
   );
-- 
GitLab