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

Function setupHome

testscripts/testrunner/setupenv.go:31–33  ·  view source on GitHub ↗

setupHome sets the test's HOME to a unique temp directory. The testscript package sets it to /no-home by default (presumably to improve isolation), but this breaks most programs.

(env *testscript.Env)

Source from the content-addressed store, hash-verified

29// package sets it to /no-home by default (presumably to improve isolation), but
30// this breaks most programs.
31func setupHome(env *testscript.Env) {
32 env.Setenv(envir.Home, env.T().(testing.TB).TempDir())
33}
34
35// setupPATH removes all directories from the test's PATH to ensure that it only
36// uses the PATH set by devbox. The one exception is the testscript's bin

Callers 1

setupTestEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected