MCPcopy Index your code
hub / github.com/jetify-com/devbox / setupPATH

Function setupPATH

testscripts/testrunner/setupenv.go:39–42  ·  view source on GitHub ↗

setupPATH removes all directories from the test's PATH to ensure that it only uses the PATH set by devbox. The one exception is the testscript's bin directory, which contains the commands given to testscript.RunMain (such as devbox itself).

(env *testscript.Env)

Source from the content-addressed store, hash-verified

37// directory, which contains the commands given to testscript.RunMain
38// (such as devbox itself).
39func setupPATH(env *testscript.Env) {
40 s, _, _ := strings.Cut(env.Getenv(envir.Path), string(filepath.ListSeparator))
41 env.Setenv(envir.Path, s)
42}
43
44// setupCacheHome sets the test's XDG_CACHE_HOME to a unique temp directory so
45// that it doesn't share caches with other tests or the user's system. For

Callers 1

setupTestEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected