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

Method AsExec

pty/start.go:48–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func (c *Cmd) AsExec() *exec.Cmd {
49 //nolint: gosec
50 execCmd := exec.CommandContext(c.Context, c.Path, c.Args[1:]...)
51 execCmd.Dir = c.Dir
52 execCmd.Env = c.Env
53 return execCmd
54}
55
56// Start the command in a TTY. The calling code must not use cmd after passing it to the PTY, and
57// instead rely on the returned Process to manage the command/process.

Callers 5

startPtyFunction · 0.80
collectMetadataMethod · 0.80
runMethod · 0.80
sessionStartMethod · 0.80

Calls 1

CommandContextMethod · 0.65

Tested by 1