MCPcopy Index your code
hub / github.com/coder/coder / basicEnv

Method basicEnv

provisioner/terraform/executor.go:47–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func (e *executor) basicEnv() []string {
48 // Required for "terraform init" to find "git" to
49 // clone Terraform modules.
50 env := safeEnviron()
51 // Only Linux reliably works with the Terraform plugin
52 // cache directory. It's unknown why this is.
53 if e.cachePath != "" && runtime.GOOS == "linux" {
54 env = append(env, "TF_PLUGIN_CACHE_DIR="+e.cachePath)
55 }
56 if e.cliConfigPath != "" {
57 env = append(env, "TF_CLI_CONFIG_FILE="+e.cliConfigPath)
58 }
59 return env
60}
61
62// execWriteOutput must only be called while the lock is held.
63func (e *executor) execWriteOutput(ctx, killCtx context.Context, args, env []string, stdOutWriter, stdErrWriter io.WriteCloser) (err error) {

Callers 5

initMethod · 0.95
parsePlanMethod · 0.95
showPlanMethod · 0.95
graphMethod · 0.95
stateMethod · 0.95

Calls 1

safeEnvironFunction · 0.85

Tested by

no test coverage detected