Travis-在sh脚本中执行Bower失败 [英] Travis - Executing bower in sh script fails
本文介绍了Travis-在sh脚本中执行Bower失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在sh脚本中执行bower命令,该脚本在travis构建的成功后
阶段中运行。我在安装
阶段安装了凉亭:
I try to execute bower commands in a sh script that is run in the after-success
phase o a travis build. I installed bower in the install
phase:
install:
- npm install -g bower
[...]
after_success:
- if [ ${TRAVIS_PULL_REQUEST} = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
./my-script.sh;
fi
不幸的是,如果我在sh脚本中调用bower,它将产生以下输出:
Unfortunately, if I call bower in the sh script it produces the following output:
./ my-script.sh:第30行:./node_modules/.bin/bower:无此类文件或目录
./my-script.sh: line 30: ./node_modules/.bin/bower: No such file or directory
我不知道如何继续解决错误。任何帮助将不胜感激,谢谢您!
I do not know how to proceed to fix the error. Any help would be greatly appreciated, thank you already!
推荐答案
我不得不使用
bash my-script.sh;
而不是
./my-script.sh;
现在一切正常。
这篇关于Travis-在sh脚本中执行Bower失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文