mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-19 00:28:03 +02:00
use sh instead of bash
This commit is contained in:
@ -116,7 +116,7 @@ func runDirectCommand(command string) (string, error) {
|
|||||||
|
|
||||||
commandLog(command)
|
commandLog(command)
|
||||||
cmdOut, err := exec.
|
cmdOut, err := exec.
|
||||||
Command("bash", "-c", command).
|
Command("sh", "-c", command).
|
||||||
CombinedOutput()
|
CombinedOutput()
|
||||||
devLog("run direct command time for command: ", command, time.Now().Sub(timeStart))
|
devLog("run direct command time for command: ", command, time.Now().Sub(timeStart))
|
||||||
return sanitisedCommandOutput(cmdOut, err)
|
return sanitisedCommandOutput(cmdOut, err)
|
||||||
@ -174,7 +174,7 @@ func branchFromLine(line string, index int) Branch {
|
|||||||
func getGitBranches() []Branch {
|
func getGitBranches() []Branch {
|
||||||
branches := make([]Branch, 0)
|
branches := make([]Branch, 0)
|
||||||
// check if there are any branches
|
// check if there are any branches
|
||||||
branchCheck, _ := runDirectCommand("git branch")
|
branchCheck, _ := runCommand("git branch")
|
||||||
if branchCheck == "" {
|
if branchCheck == "" {
|
||||||
return append(branches, branchFromLine("master", 0))
|
return append(branches, branchFromLine("master", 0))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user