1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-16 11:37:01 +02:00
lazygit/pkg/commands/oscommands/dummies.go

27 lines
648 B
Go
Raw Normal View History

package oscommands
import (
2021-12-30 04:11:58 +02:00
"github.com/jesseduffield/lazygit/pkg/secureexec"
"github.com/jesseduffield/lazygit/pkg/utils"
)
// NewDummyOSCommand creates a new dummy OSCommand for testing
func NewDummyOSCommand() *OSCommand {
return NewOSCommand(utils.NewDummyCommon())
}
2021-12-30 04:11:58 +02:00
2021-12-30 08:19:01 +02:00
func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder {
2021-12-30 04:11:58 +02:00
return &CmdObjBuilder{
runner: runner,
logCmdObj: func(ICmdObj) {},
command: secureexec.Command,
platform: &Platform{
OS: "darwin",
Shell: "bash",
ShellArg: "-c",
OpenCommand: "open {{filename}}",
OpenLinkCommand: "open {{link}}",
},
}
}