当在Sublime文本插件中执行mintty中的命令时,“找不到命令”终端
问题描述:
我试图通过Sublime Text插件终端使用Putty控制台。
当我用这种方式打开它时,我不能使用Gulp。 当我直接打开腻子 - 吞咽工作正确。
当在Sublime文本插件中执行mintty中的命令时,“找不到命令”终端
我该如何解决?
控制台输出:
崇高插件bash: cut: command not found
[email protected] ~/Desktop/Проекты учебные/Gulp/test_gulp/gulp and workflow (master)
$ gulp
/c/Users/user/AppData/Roaming/npm/gulp: line 2: sed: command not found
/c/Users/user/AppData/Roaming/npm/gulp: line 2: dirname: command not found
/c/Users/user/AppData/Roaming/npm/gulp: line 4: uname: command not found
module.js:472
throw err;
^
Error: Cannot find module 'C:\Program Files\Git\node_modules\gulp\bin\gulp.js'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:425:7)
at startup (bootstrap_node.js:146:9)
at bootstrap_node.js:540:3
设置终端
{
// The command to execute for the terminal, leave blank for the OS default
// See https://github.com/wbond/sublime_terminal#examples for examples
"terminal": "C:\\Program Files\\Git\\usr\\bin\\mintty.exe",
"parameters": []
}
答
腻子默认打开一个交互式shell会话。
虽然mintty.exe
(什么不是PuTTY控制台)可能默认打开非交互式会话。
另一组启动脚本是交互式和非交互式会话的来源。尽管一般情况下应该以这样的方式配置脚本,即在两种情况下都设置相同的环境变量(例如PATH
),但在您的帐户中不是这样。即使对于非交互式会话,您也必须修复启动脚本以正确设置PATH
。