cd to / before running soong_build .
This lets one avoid any decisions as to when to chdir there during its execution and leads to better sandboxing because the pwd doesn't leak to init() functions anymore. Test: Manual. Change-Id: I1560da8ed3a621249426f9e8908aa890c21e13ba
This commit is contained in:
17
shared/debug.go
Normal file
17
shared/debug.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package shared
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// Finds the Delve binary to use. Either uses the SOONG_DELVE_PATH environment
|
||||
// variable or if that is unset, looks at $PATH.
|
||||
func ResolveDelveBinary() string {
|
||||
result := os.Getenv("SOONG_DELVE_PATH")
|
||||
if result == "" {
|
||||
result, _ = exec.LookPath("dlv")
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
Reference in New Issue
Block a user