简体   繁体   中英

error: pathspec 'CI]"' did not match any file(s) known to git

I want to run git command in Gradle Android with groovy. the command is commit with skip ci message.

`git commit -m "[skip ci]"` 

I use this code in Gradle task

def git  = "git commit -m \"[skip ci]\"".execute()
git.waitFor()
println git.errorStream.text

in other case like git pull or git push it execute without any problem but in this case I'm faced with this error.

tip : git command run without any problem in terminal.

我为我的问题找到了方法

    def git = ['sh', '-c', 'git commit -m "[skip ci]"'].execute()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM