Skip to content

Commit

Permalink
Merge pull request #28 from stuartleeks/sl/fix-paths
Browse files Browse the repository at this point in the history
Set working folder for git command
  • Loading branch information
stuartleeks authored Oct 16, 2020
2 parents aef293c + 2c29d14 commit 1d73d87
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/pkg/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
// GetTopLevelPath returns the top-level folder for the git-repo that contains path, or empty string if not a repo
func GetTopLevelPath(path string) (string, error) {
cmd := exec.Command("git", "rev-parse", "--show-toplevel")
cmd.Dir = path

buf, err := cmd.Output()
if err != nil {
Expand Down

0 comments on commit 1d73d87

Please sign in to comment.