我正在制作运行bash脚本的任务
task wsUpload(type: Exec) {
commandLine '../scripts/ws_upload.sh ' + rootProject.ext.VERSION_CODE
}
然而它返回
Caused by: java.io.IOException: Cannot run program "../scripts/ws_upload.sh 30" .... No such file or directory
如果我运行没有参数的相同命令
task wsUpload(type: Exec) {
commandLine '../scripts/ws_upload.sh'
}
然后执行命令。我做错了什么?
答案 0 :(得分:0)
添加这样的args
task wsUpload(type: Exec) {
commandLine '../scripts/ws_upload.sh'
args = ["args"]
}