1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 16:22:24 +03:00
This commit is contained in:
Jesse Duffield
2021-12-29 14:33:38 +11:00
parent 192a548c99
commit 43a4fa970d
41 changed files with 539 additions and 419 deletions

View File

@@ -45,7 +45,7 @@ func RunTests(
testDir := filepath.Join(rootDir, "test", "integration")
osCommand := oscommands.NewDummyOSCommand()
err = osCommand.Run(osCommand.NewCmdObj("go build -o " + tempLazygitPath()))
err = osCommand.Cmd.New("go build -o " + tempLazygitPath()).Run()
if err != nil {
return err
}
@@ -319,7 +319,7 @@ func generateSnapshot(dir string) (string, error) {
for _, cmdStr := range cmdStrs {
// ignoring error for now. If there's an error it could be that there are no results
output, _ := osCommand.RunWithOutput(osCommand.NewCmdObj(cmdStr))
output, _ := osCommand.Cmd.New(cmdStr).RunWithOutput()
snapshot += output + "\n"
}
@@ -428,7 +428,7 @@ func getLazygitCommand(testPath string, rootDir string, record bool, speed float
cmdStr := fmt.Sprintf("%s -debug --use-config-dir=%s --path=%s %s", tempLazygitPath(), configDir, actualDir, extraCmdArgs)
cmdObj := osCommand.NewCmdObj(cmdStr)
cmdObj := osCommand.Cmd.New(cmdStr)
cmdObj.AddEnvVars(fmt.Sprintf("SPEED=%f", speed))
if record {