fix git command's end-of-options (#1213)

code-1625
Marko Gacesa 2024-04-12 14:20:42 +00:00 committed by Harness
parent 781b3547c0
commit 261b1f3e95
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ func (b builder) args(flags []string, args []string, postSepArgs []string) ([]st
}
cmdArgs = append(cmdArgs, args...)
if len(postSepArgs) > 0 {
if len(postSepArgs) > 0 && len(cmdArgs) > 0 && cmdArgs[len(cmdArgs)-1] != "--end-of-options" {
cmdArgs = append(cmdArgs, "--")
}