Skip to content

Commit

Permalink
rerungo: handle GOROOT values that contain /pkg/ in the path
Browse files Browse the repository at this point in the history
  • Loading branch information
a committed Sep 24, 2024
1 parent 430234e commit 789b0af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extras/rerungo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ func replacegdlv(debug, ccstr string) string {
os.Setenv(key, value)
cmd, rest, _ = strings.Cut(rest, " ")
}
goroot, cmd, _ := strings.Cut(cmd, "/pkg/")
idx := strings.LastIndex(cmd, "/pkg/")
goroot := cmd[:idx]
cmd = cmd[idx:]
var path string
switch {
case strings.Contains(cmd, "/compile"):
Expand Down

0 comments on commit 789b0af

Please sign in to comment.