Get proper GOPATH in trim function (#5744)

Set GOPATH string to empty in build-constants.go
Check for both compile time GOPATH and default GOPATH
while trimming the file path in the stack trace.
Fixes #5741
This commit is contained in:
kannappanr
2018-03-30 19:13:25 -07:00
committed by Harshavardhana
parent 4d02f9bccf
commit b87cc3d643
2 changed files with 11 additions and 3 deletions

View File

@@ -16,13 +16,11 @@
package cmd
import "go/build"
// DO NOT EDIT THIS FILE DIRECTLY. These are build-time constants
// set through buildscripts/gen-ldflags.go.
var (
// GOPATH - GOPATH value at the time of build.
GOPATH = build.Default.GOPATH
GOPATH = ""
// Go get development tag.
goGetTag = "DEVELOPMENT.GOGET"