【发布时间】:2015-05-06 02:25:26
【问题描述】:
有没有办法在 Windows 上使用 Grunt.js 调用 Cygwin 或 git shell 而不是 CMD?我正在尝试构建一个自动部署系统,但是 CMD 中的 ssh 命令不会将我的 RSA 密钥与 ssh 一起使用。目前我正在使用 grunt-shell 插件,它在 mac 上运行良好。但由于 Window 的怪癖,它并没有按照我的意愿去做。
对此的任何帮助将不胜感激。
【问题讨论】:
-
我在 cygwin 中运行作曲家时遇到了类似的问题。我通过添加到我的 .bashrc 文件
script_dir=$(cygpath -w $(dirname $0)) alias composer ='php "$script_dir/composer.phar" $@'克服了这个问题,这将使 cygwin 在启动时有点脾气暴躁,但能够运行像composter update这样的命令。这并不能解决您的问题的实质,但很有帮助。 Grunt 还谈到了使用 cygwin 和 windows a little bit here.
标签: javascript node.js git shell ssh