summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorBirger Skogeng Pedersen <birger.sp@gmail.com>2022-01-20 08:36:07 +0100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-21 23:13:39 +1100
commita78cbf48821e426cea93825254c9aec5e91e9eef (patch)
treefd46077c7f832ca1e9d71f6f8ca95a334e373071 /pkg
parent62a7d9bbcc5f43cee74468b18b36906c6b3ff1e1 (diff)
remove redundant title-setting shell command args
Diffstat (limited to 'pkg')
-rw-r--r--pkg/commands/oscommands/os.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go
index 5790d17dc..53f5bd6f6 100644
--- a/pkg/commands/oscommands/os.go
+++ b/pkg/commands/oscommands/os.go
@@ -6,7 +6,6 @@ import (
"os"
"os/exec"
"path/filepath"
- "runtime"
"strings"
"sync"
@@ -270,14 +269,13 @@ func GetLazygitPath() string {
}
func (c *OSCommand) UpdateWindowTitle() error {
- if runtime.GOOS != "windows" {
+ if c.Platform.OS != "windows" {
return nil
}
path, getWdErr := os.Getwd()
if getWdErr != nil {
return getWdErr
}
- title := fmt.Sprint(filepath.Base(path), " - Lazygit")
- args := append([]string{"cmd", "/C", "title"}, strings.Split(title, " ")...)
- return c.Cmd.NewShell(strings.Join(args, " ")).Run()
+ argString := fmt.Sprint("title ", filepath.Base(path), " - Lazygit")
+ return c.Cmd.NewShell(argString).Run()
}