MCPcopy Index your code
hub / github.com/jesseduffield/lazygit / runCommandWithOutputAndEnv

Method runCommandWithOutputAndEnv

pkg/integration/components/shell.go:61–69  ·  view source on GitHub ↗
(args []string, env []string)

Source from the content-addressed store, hash-verified

59}
60
61func (self *Shell) runCommandWithOutputAndEnv(args []string, env []string) (string, error) {
62 cmd := exec.Command(args[0], args[1:]...)
63 cmd.Env = append(self.env, env...)
64 cmd.Dir = self.dir
65
66 output, err := cmd.CombinedOutput()
67
68 return string(output), err
69}
70
71func (self *Shell) RunShellCommand(cmdStr string) *Shell {
72 shell := "sh"

Callers 2

RunCommandWithEnvMethod · 0.95
runCommandWithOutputMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected