1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

use sh instead of bash

This commit is contained in:
Jesse Duffield 2018-08-07 13:44:00 +10:00
parent a4f4a16237
commit 384d2e3c83

View File

@ -116,7 +116,7 @@ func runDirectCommand(command string) (string, error) {
commandLog(command)
cmdOut, err := exec.
Command("bash", "-c", command).
Command("sh", "-c", command).
CombinedOutput()
devLog("run direct command time for command: ", command, time.Now().Sub(timeStart))
return sanitisedCommandOutput(cmdOut, err)
@ -174,7 +174,7 @@ func branchFromLine(line string, index int) Branch {
func getGitBranches() []Branch {
branches := make([]Branch, 0)
// check if there are any branches
branchCheck, _ := runDirectCommand("git branch")
branchCheck, _ := runCommand("git branch")
if branchCheck == "" {
return append(branches, branchFromLine("master", 0))
}