git-revision-webpack-plugin icon indicating copy to clipboard operation
git-revision-webpack-plugin copied to clipboard

lastCommitDateTimeCommand: Invalid object name %H

Open luigigargioni opened this issue 2 years ago • 0 comments

I tried customising the format of the last commit date and it works in Git bash, but I get the following error when I try to compile with webpack

const gitRevision = new GitRevisionPlugin({
  branch: true,
  lastCommitDateTimeCommand:
    "log -1 --pretty='%cd' --date=format:'%d/%m/%Y %H:%M:%S'",
})
Error: Command failed: git log -1 --pretty='%cd' --date=format:'%d/%m/%Y %H:%M:%S'
fatal: invalid object name '%H'.

I think that could be some problem about the quotes

luigigargioni avatar Mar 23 '22 09:03 luigigargioni