You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specify the name of the app to open the target with, and optionally, app arguments. app can be an array of apps to try to open and name can be an array of app names to try. If each app fails, the last error will be thrown.
Steps to reproduce
I wrote the following code in the Windows which is consistent with the description in Basic Info. If the description of app api in the options is correct, then the web page will be opened by the chrome browser because there is no firefox browser. But the current situation is that the chrome browser or the msedge browser does not open the web page.
Then I wrote the similar code that change in the MacOS which is consistent with the description in Basic Info, just replaced msedge with safari. The browser still does not open the web page.
The mapper function calls the baseOpen function, and no exception is thrown in the baseOpen function, so the catch is actually an unreachable statement.
After reading the api of child_process in node.js, I think we should refer to options.stdio to modify childProcessOptions
Basic Info
Windows
System: Windows 10 x64 (19043.1348)
Browser:
MacOS
What is expected?
Steps to reproduce
I wrote the following code in the Windows which is consistent with the description in Basic Info. If the description of app api in the options is correct, then the web page will be opened by the chrome browser because there is no firefox browser. But the current situation is that the chrome browser or the msedge browser does not open the web page.
Then I wrote the similar code that change in the MacOS which is consistent with the description in Basic Info, just replaced
msedge
withsafari
. The browser still does not open the web page.Analysis
After debugging, I think the problem lies in the
pTryEach
function:The
mapper
function calls thebaseOpen
function, and no exception is thrown in thebaseOpen
function, so thecatch
is actually an unreachable statement.After reading the api of child_process in node.js, I think we should refer to options.stdio to modify
childProcessOptions
And add the following code after the statement to throw an exception:
Please confirm whether the bug exists, and I will submit a pr to fix it after confirmation.
The text was updated successfully, but these errors were encountered: