Skip to content

Conversation

@cbreezier
Copy link

Relative path is ambiguously relative to current directory or git root

When running git notes add -F it seems like the file is relative to git root rather than current directory. Maybe this is an issue with git, but we can be a bit more robust by using an absolute path

Relative path is ambiguously relative to current directory or git root
}

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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants