12.0.0 react-dev-utils/openBrowser.js/startBrowserProces bug => BROWSER env value ignored
Describe the bug
react-dev-utils@12.0.0
function startBrowserProcess
is calling npm package open
function open
with wrongly shaped parameter.
Detected on LinuxOS.
Call from react-dev-utils/openBrowser.js/startBrowserProcess
to open/open(url,options)
is using wrong form for the options
parameter. As a result, when using environment variable BROWSER
, that value gets ignored and the default browser is opened instead.
react-dev-utils/openBrowser.js/startBrowserProcess
var options = { app: browser, wait: false, url: true };
open(url, options).catch(() => {}); // Prevent `unhandledRejection` error.
return true;
The value of browser
is the BROWSER env value, but the property app
should be an object
{name: browser}
instead. Here are the usage examples provided by the open
npm package page:
// Opens the URL in a specified browser.
await open('https://sindresorhus.com', {app: {name: 'firefox'}});
// Specify app arguments.
await open('https://sindresorhus.com', {app: {name: 'google chrome', arguments: ['--incognito']}});