1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-05 15:15:49 +02:00

remove OSCommand field

This commit is contained in:
Jesse Duffield 2022-01-07 15:01:07 +11:00
parent 007235df23
commit 946a35b59d
4 changed files with 4 additions and 6 deletions

View File

@ -21,7 +21,6 @@ import (
// GitCommand is our main git interface
type GitCommand struct {
*common.Common
OSCommand *oscommands.OSCommand
Repo *gogit.Repository
@ -122,8 +121,7 @@ func NewGitCommandAux(
patchCommands := NewPatchCommands(cmn, cmd, rebaseCommands, commitCommands, configCommands, statusCommands, patchManager)
return &GitCommand{
Common: cmn,
OSCommand: osCommand,
Common: cmn,
Repo: repo,

View File

@ -114,7 +114,7 @@ func (gui *Gui) handleCopyPullRequestURLPress() error {
return gui.surfaceError(err)
}
gui.logAction(gui.Tr.Actions.CopyPullRequestURL)
if err := gui.GitCommand.OSCommand.CopyToClipboard(url); err != nil {
if err := gui.OSCommand.CopyToClipboard(url); err != nil {
return gui.surfaceError(err)
}

View File

@ -815,7 +815,7 @@ func (gui *Gui) handleOpenCommitInBrowser() error {
}
gui.logAction(gui.Tr.Actions.OpenCommitInBrowser)
if err := gui.GitCommand.OSCommand.OpenLink(url); err != nil {
if err := gui.OSCommand.OpenLink(url); err != nil {
return gui.surfaceError(err)
}

View File

@ -63,7 +63,7 @@ func (gui *Gui) createPullRequest(from string, to string) error {
gui.logAction(gui.Tr.Actions.OpenPullRequest)
if err := gui.GitCommand.OSCommand.OpenLink(url); err != nil {
if err := gui.OSCommand.OpenLink(url); err != nil {
return gui.surfaceError(err)
}