Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion store/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"os/exec"
"strings"
"path/filepath"
)

func GitLog(ref string, commitrange string, format string) *exec.Cmd {
Expand Down Expand Up @@ -48,7 +49,7 @@ func WriteNotes(writef func(io.Writer) error, ref string) error {
return fmt.Errorf("Error closing .git-ratchet-note %s", err)
}

writenotes := exec.Command("git", "notes", "--ref="+ref, "add", "-f", "-F", notepath)
writenotes := exec.Command("git", "notes", "--ref="+ref, "add", "-f", "-F", filepath.Abs(notepath))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

store/git.go:52: multiple-value filepath.Abs() in single-value context

https://golang.org/pkg/path/filepath/#Abs

filepath.Abs() returns (string, error) -> you'll need to handle the potential error there before passing it through to the exec.Command.


log.INFO.Println(strings.Join(writenotes.Args, " "))

Expand Down