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
When using open, even if you run node using cmd instead of powershell, the open function call changes the execution context to powershell, which is... not great? That should just stay cmd.
This is most obvious with some straight foward STR.
Create a file test.js and put the following code in it:
import open from "open";
open("https://github.com");
await new Promise(resolve => setTimeout(resolve, 10000));
run cmd and cd to the folder with test.js
run node test.js.
The cmd title bar briefly changes to C:\Windows\System32\cmd.exe - node test.js, then changes to Windows Powershell. Something it really should not be doing. There aren't infinitely many windows-native command line interfaces, detecting that we're in cmd and using that instead of using powershell would be pretty reasonable, given that the code looks like it's already checking whether it's in WSL or not.
The text was updated successfully, but these errors were encountered:
Pomax
changed the title
this seems to switch execution context on Windows to Powershell, even when in "cmd"
this seems to switch execution context on Windows to Powershell when using "cmd"
Mar 11, 2023
When using open, even if you run
node
usingcmd
instead of powershell, theopen
function call changes the execution context to powershell, which is... not great? That should just staycmd
.This is most obvious with some straight foward STR.
test.js
and put the following code in it:cmd
and cd to the folder withtest.js
node test.js
.The
cmd
title bar briefly changes toC:\Windows\System32\cmd.exe - node test.js
, then changes toWindows Powershell
. Something it really should not be doing. There aren't infinitely many windows-native command line interfaces, detecting that we're incmd
and using that instead of using powershell would be pretty reasonable, given that the code looks like it's already checking whether it's in WSL or not.The text was updated successfully, but these errors were encountered: