Closed
Description
Currently node CLI apps that use the opn
to open a browser do not work when run in a remote context.
To support this, the code CLI available in a remote context should provide a CLI option/command (e.g. code-open
) that opens a URL in the local browser from the locally running VS Code .
The opn
module which uses the xdg-open
utility supports a BROWSER
environment variable. BROWSER
is a similar environment variable like EDITOR
, it contains the path to the web browser. Now, when a remote context defines this environment variable BROWSER with the code command, then the opn
module also works in the remote context.
Test case:
- npx create-react-app my-app
- cd my-app
- npm start
This should open the webpage for the react app in a browser.