Skip to content

Commit 26bcca6

Browse files
committed
🔥 PathFromRepoRoot
1 parent df36a08 commit 26bcca6

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

git/git.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -398,21 +398,6 @@ func GetDirFromPath(p string) (string, error) {
398398
return firstLine(output), err
399399
}
400400

401-
func PathFromRepoRoot() string {
402-
showCmd, err := GitCommand("rev-parse", "--show-prefix")
403-
if err != nil {
404-
return ""
405-
}
406-
output, err := run.PrepareCmd(showCmd).Output()
407-
if err != nil {
408-
return ""
409-
}
410-
if path := firstLine(output); path != "" {
411-
return path[:len(path)-1]
412-
}
413-
return ""
414-
}
415-
416401
func outputLines(output []byte) []string {
417402
lines := strings.TrimSuffix(string(output), "\n")
418403
return strings.Split(lines, "\n")

0 commit comments

Comments
 (0)