将Node.exe设置为使用cmd.exe而不是PowerShell


1

运行Node.js命令时,它会自动使用Powershell而不是cmd.exe。该comspec设置被设置为CMD.EXE。还有其他地方我应该改变这个吗?

我不确定它是Windows或Node.js相关设置(或两者兼而有之)。

节点v6.10.2,Windows 8.1专业版

如果有人知道Salesforce DX,这就是我正在运行的,sfdx正在使用节点,而node.exe触发Powershell而不是cmd.exe:

sfdx force:auth:web:login --setdefaultdevhubusername --setalias "dev-hub-org"

Answers:


1

Node.js本身(node.exe)既不使用PowerShell也不使用命令提示符。(因为,它是一个命令行应用程序,但它运行控制台主机。)

然而,Saleforce DX可能会发布它喜欢的任何东西,无论是Command Prompt还是PowerShell。你必须与它的开发人员一起讨论。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.