service,terminal,cmd/dlv: automatically guessing substitute-path config (#3781)

Add command, API calls and launch.json option to automatically guess
substitute-path configuration.
This commit is contained in:
Alessandro Arzilli
2024-10-31 18:19:08 +01:00
committed by GitHub
parent ac14553fda
commit 822014b8e8
20 changed files with 650 additions and 95 deletions

View File

@ -130,6 +130,9 @@ This option can only be specified if testset is basic or a single package.`)
}
func checkCert() bool {
if os.Getenv("NOCERT") != "" {
return false
}
// If we're on OSX make sure the proper CERT env var is set.
if runtime.GOOS != "darwin" || os.Getenv("CERT") != "" {
return true
@ -326,7 +329,7 @@ func buildFlags() []string {
} else {
ldFlags = "-X main.Build=" + buildSHA
}
if runtime.GOOS == "darwin" {
if runtime.GOOS == "darwin" && os.Getenv("CERT") != "" {
ldFlags = "-s " + ldFlags
}
return []string{fmt.Sprintf("-ldflags=%s", ldFlags)}