MCPcopy
hub / github.com/jesseduffield/lazygit / RunCommandWithEnv

Method RunCommandWithEnv

pkg/integration/components/shell.go:39–46  ·  view source on GitHub ↗

Run a command with additional environment variables set

(args []string, env []string)

Source from the content-addressed store, hash-verified

37
38// Run a command with additional environment variables set
39func (self *Shell) RunCommandWithEnv(args []string, env []string) *Shell {
40 output, err := self.runCommandWithOutputAndEnv(args, env)
41 if err != nil {
42 self.fail(fmt.Sprintf("error running command: %v\n%s", args, output))
43 }
44
45 return self
46}
47
48func (self *Shell) RunCommandExpectError(args []string) *Shell {
49 output, err := self.runCommandWithOutput(args)

Callers 2

RunCommandMethod · 0.95
EmptyCommitWithDateMethod · 0.95

Calls 3

failMethod · 0.80
SprintfMethod · 0.65

Tested by

no test coverage detected