promise-spawn
promise-spawn copied to clipboard
fix: error invalid arg type on WSL systems on url open
Fix the error invalid arg type on open url in browser on WSL envoirnment. The npm error on WSL npm notice Log in on https://registry.npmjs.org/ Login at: https://www.npmjs.com/login?next=/login/cli/CENSORED Press ENTER to open in the browser... npm ERR! code ERR_INVALID_ARG_TYPE npm ERR! The "file" argument must be of type string. Received undefined npm ERR! Cannot read properties of undefined (reading 'stdin')
The process.env.ComSpec is undefined in WSL, leading to an incorrect shell configuration. The original command 'start ""' isn't recognized as a valid command in WSL. The fixed implementation correctly constructs the full Windows command, ensuring it works in both regular windows and WSL environments.