Skip to content

Commit 79fe171

Browse files
committed
Wrap path in double quotes
1 parent 65161bc commit 79fe171

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

utils/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func GetFullCommitSha(repoPath, shortID string) (string, error) {
2222

2323
// LastCommitForPath returns the last commit which modified path for given revision.
2424
func LastCommitForPath(repoPath, revision string, path string) (string, error) {
25-
cmd := exec.Command("bash", "-c", "git log --pretty=%H --max-count=1 "+revision+" -- "+path)
25+
cmd := exec.Command("bash", "-c", "git log --pretty=%H --max-count=1 "+revision+" -- \""+path+"\"")
2626
cmd.Dir = repoPath
2727
out, err := cmd.Output()
2828
if err != nil {

0 commit comments

Comments
 (0)