Skip to content

Commit 1d73d87

Browse files
authored
Merge pull request #28 from stuartleeks/sl/fix-paths
Set working folder for git command
2 parents aef293c + 2c29d14 commit 1d73d87

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/pkg/git/git.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
// GetTopLevelPath returns the top-level folder for the git-repo that contains path, or empty string if not a repo
1111
func GetTopLevelPath(path string) (string, error) {
1212
cmd := exec.Command("git", "rev-parse", "--show-toplevel")
13+
cmd.Dir = path
1314

1415
buf, err := cmd.Output()
1516
if err != nil {

0 commit comments

Comments
 (0)