-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out how to pass a Node script to BROWSER #1533
Comments
I think that the best choice is to spawn a child process to execute the node script if the react-dev-utils uses
Handling the ".js" extension is much easier and secure. |
Sounds good. Want to send a PR to support this? |
Sure, I'll work on it this week. |
Fixed in #1590. |
Is it possible to use the Looking for an equivalent to Trying to limit the reach of browser extensions such as React and Redux that run on all tabs and have access to all our browsing data. |
Found a way to achieve this using the script option on MacOS. The following works if a Set // Content of open.js
const { spawn } = require('child_process');
spawn(
'/Applications/Firefox.app/Contents/MacOS/firefox-bin',
['-p', 'development', process.argv[2]],
{ detached: true }
);
process.exit(0); Then run |
We added support for
BROWSER
env variable that is interpreted by OS-specific command.On OS X, it runs
open http://url.com -a <BROWSER>
.However I'm not sure how to make it execute a Node script, and if it's even possible. That would be the best for allowing use cases like #1096 and #1450. It would be awesome to investigate how to get it working with a Node script (my naïve attempt at pointing it to a shell script with node env didn't seem to work), and maybe implement some custom handling for JS extension if we don't find a solution.
The text was updated successfully, but these errors were encountered: