当我运行以下命令逐一在终端它的工作原理和安装,MAC OS - Node.js的(NPM) - 通过AppleScript的具有管理员权限安装
须藤NPM安装主管
须藤NPM安装永远
它要求管理员密码在终端窗口并安装正常。
在我的AppleScript运行本作,
tell application "Terminal"
do script "sudo npm install supervisor" in window 1
end tell
tell application "Terminal"
do script "sudo npm install forever --global" in window 1
end tell
它打开终端,并询问密码,并等待用户响应输入密码才能继续。我试过以下的AppleScript,
do shell script "sudo npm install supervisor" with administrator privileges
do shell script "sudo npm install forever --global" with administrator privileges
而且得到了以下错误,
错误 “命令:NPM:找不到命令” 1号
的AppleScript的需要索要普通密码输入用户名和密码对话框并运行,
sudo npm install su pervisor
须藤NPM安装永远
在终端不要求在终端窗口的密码。怎么做?
谢谢你工作完美。 –