Skip to content

Commit 81c0cd4

Browse files
heyimalexTimer
authored andcommitted
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
1 parent 49e258b commit 81c0cd4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: packages/create-react-app/createReactApp.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,12 @@ if (program.info) {
135135
npmGlobalPackages: ['create-react-app'],
136136
},
137137
{
138-
clipboard: true,
138+
clipboard: false,
139139
duplicates: true,
140140
showNotFound: true,
141141
}
142142
)
143-
.then(console.log)
144-
.then(() => console.log(chalk.green('Copied To Clipboard!\n')));
143+
.then(console.log);
145144
}
146145

147146
if (typeof projectName === 'undefined') {

0 commit comments

Comments
 (0)