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
This commit is contained in:
Alex Guerra
2018-11-27 07:07:44 -06:00
committed by Joe Haddad
parent 49e258b4a6
commit 81c0cd4b19

View File

@@ -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') {