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.
test.js
and put the following code in it:import open from "open";
open("https://github.com");
await new Promise(resolve => setTimeout(resolve, 10000));
cmd
and cd to the folder with test.js
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.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too