在一个的NodeJS脚本我有以下的代码,这使得呼叫同步,并返回从shell脚本我打电话的标准输出: var sh = require('shelljs');
... some code
var output = sh.exec('./someshellscript.sh', {silent:true}).stdout;
console.log(output);
... some more
我想写一个npm脚本来执行ssh shell命令。目前它正在通过执行osascript命令来打开终端窗口并运行该命令。 我想改变它来执行当前终端的命令。该脚本包括shelljs和executive。当我使用executive时,脚本没有发生任何事情。随着shelljs我得到: Pseudo-terminal will not be allocated because stdin is not a