From f6547ad2b0959f51597a5ec2997d1e5cc961c109 Mon Sep 17 00:00:00 2001 From: Alex Guerra Date: Tue, 27 Nov 2018 07:07:44 -0600 Subject: [PATCH] Disable copy to clipboard in cra --info (#5905) * Disable copy to clipboard in cra --info Fixes an issue where npx create-react-app --info throws an exception on Windows. The exception was caused by envinfo's copy to clipboard functionality; envinfo is distributed pre-bundled, but the dependency it uses for copying to the clipboard makes use of a binary on Windows that can't be found once the bundle is made. Disabling copy to clipboard fixes the issue. Closes #5757. * Explicitly set clipboard to false --- packages/create-react-app/createReactApp.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 50bf9befd39..f7e5dffd4ff 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -135,13 +135,12 @@ if (program.info) { npmGlobalPackages: ['create-react-app'], }, { - clipboard: true, + clipboard: false, duplicates: true, showNotFound: true, } ) - .then(console.log) - .then(() => console.log(chalk.green('Copied To Clipboard!\n'))); + .then(console.log); } if (typeof projectName === 'undefined') {