Skip to content

Github actions, gradle. pretty=format flag for git log is not working #26397

Discussion options

You must be logged in to vote

To be even more precise. This command inside the Gradle task does work:

 printf("git log develop --no-merges --date=short --pretty=oneline ${tag}...HEAD".execute().text.trim())

and it doesn’t:

 printf("git log develop --no-merges --date=short --pretty=\"%ad %an: %s\" ${getNewestTag()}...HEAD".execute().text.trim())

EDIT:
After changing my runner from Linux to windows it started to work (locally I use windows).

I assume that Linux runnable works differently with escape characters. It probably ends up with error when I put " or % signs inside a command.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant