-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
snitebobbie/react-native
#19Closed
Copy link
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Description
The copy button in the android emulator is not working on the Linux platform.
Reproduction Steps and Sample Code
In order to reproduce this, just create a new react-native app and add a syntax error in index.android.js. Run this app and the error screen will show up but you would not be able to copy the error.
CopyToClipboard.js has no case for linux
Solution
The following solution worked for me:
- add
xselbinary in a vendor folder inside the util where copyToClipBoard.js is located - access it by
var xsel = path.join(__dirname, './vendor/xsel'); - give the binary permissions using
fslibrary:fs.chmodSync(xsel, '0755'); - update copyToClipBoard.js with a linux platform option.
case 'linux':
var child = spawn('xsel', ['--clipboard', '--input']);
child.stdin.end(new Buffer(content, 'utf8'));
return true;
I can make a pull request but I am not sure what tests should be implemented and where to implement them.
Additional Information
- React Native version: 0.43
- Platform: Android
- Development Operating System: Linux
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.