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

Method cmd

scripts/develop/main.go:459–464  ·  view source on GitHub ↗

cmd builds an exec.Cmd rooted in the project directory with a clean child environment. The context controls process lifetime.

(ctx context.Context, bin string, args ...string)

Source from the content-addressed store, hash-verified

457// cmd builds an exec.Cmd rooted in the project directory with a
458// clean child environment. The context controls process lifetime.
459func (c *devConfig) cmd(ctx context.Context, bin string, args ...string) *exec.Cmd {
460 cmd := exec.CommandContext(ctx, bin, args...)
461 cmd.Dir = c.projectRoot
462 cmd.Env = slices.Clone(c.childEnv)
463 return cmd
464}
465
466// parseEnvFileFlag extracts the --env-file value from os.Args and
467// CODER_DEV_ENV_FILE before serpent runs, so that loaded variables

Callers 6

TestDevConfigCmdFunction · 0.95
startServerFunction · 0.80
startServerDebugFunction · 0.80
setupMultiOrgFunction · 0.80
setupWorkspaceProxyFunction · 0.80
pnpmCmdFunction · 0.80

Calls 2

CommandContextMethod · 0.65
CloneMethod · 0.45

Tested by 1

TestDevConfigCmdFunction · 0.76