Remove TEMPORARY_DISABLE_PATH_RESTRICTIONS

This was a temporary migration tool, and has been broken ever since the
ninja environment started being restricted. Remove it, since it has
lasted two releases.

Test: TEMPORARY_DISABLE_PATH_RESTRICTIONS=true m
Change-Id: I2e3709525598030f5c24d12fa966e531dfed33ae
This commit is contained in:
Dan Willemsen
2020-05-01 16:29:00 -07:00
parent 1612e2641e
commit 347ba75679
2 changed files with 6 additions and 12 deletions

View File

@@ -53,14 +53,7 @@ func main() {
os.Exit(1)
}
disableError := false
if e, ok := os.LookupEnv("TEMPORARY_DISABLE_PATH_RESTRICTIONS"); ok {
disableError = e == "1" || e == "y" || e == "yes" || e == "on" || e == "true"
}
exitCode, err := Main(os.Stdout, os.Stderr, interposer, os.Args, mainOpts{
disableError: disableError,
sendLog: paths.SendLog,
config: paths.GetConfig,
lookupParents: lookupParents,
@@ -79,8 +72,6 @@ If a tool isn't in the allowed list, a log will be posted to the unix domain
socket at <interposer>_log.`)
type mainOpts struct {
disableError bool
sendLog func(logSocket string, entry *paths.LogEntry, done chan interface{})
config func(name string) paths.PathConfig
lookupParents func() []paths.LogProcess
@@ -131,7 +122,7 @@ func Main(stdout, stderr io.Writer, interposer string, args []string, opts mainO
}, waitForLog)
defer func() { <-waitForLog }()
}
if config.Error && !opts.disableError {
if config.Error {
return 1, fmt.Errorf("%q is not allowed to be used. See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.", base)
}
}