Skip to content

Commit 6b6ea32

Browse files
panjf2000Jay Conrod
authored and
Jay Conrod
committed
cmd/go: use the global rooted path name
Change-Id: I4a450af5f35f0ad4e4652789f1eda4d3171610e7 Reviewed-on: https://go-review.googlesource.com/c/go/+/302852 Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Trust: Jay Conrod <[email protected]>
1 parent db4adb1 commit 6b6ea32

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/cmd/go/internal/base/path.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ func ShortPath(path string) string {
3232
// made relative to the current directory if they would be shorter.
3333
func RelPaths(paths []string) []string {
3434
var out []string
35-
// TODO(rsc): Can this use Cwd from above?
36-
pwd, _ := os.Getwd()
3735
for _, p := range paths {
38-
rel, err := filepath.Rel(pwd, p)
36+
rel, err := filepath.Rel(Cwd, p)
3937
if err == nil && len(rel) < len(p) {
4038
p = rel
4139
}

0 commit comments

Comments
 (0)