Skip to content

Commit

Permalink
Disable copy to clipboard in cra --info (#5905)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
heyimalex authored and Timer committed Nov 27, 2018
1 parent 49e258b commit 81c0cd4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 81c0cd4

Please sign in to comment.