【问题标题】:Is there a way to call commands in git shell on windows using Grunt.js有没有办法使用 Grunt.js 在 Windows 上的 git shell 中调用命令
【发布时间】: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


【解决方案1】:

请尝试https://github.com/sindresorhus/grunt-shell

这是与其他 CLI 工具交互的好方法。例如。编译 Compass compass 编译或获取当前 git 分支 git 分支。

【讨论】:

    猜你喜欢
    • 2016-03-24
    • 2020-05-04
    • 2017-08-24
    • 2020-06-23
    • 2014-04-07
    • 1970-01-01
    • 2011-12-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多