Skip to content

Commit

Permalink
fix: use $SHELL instead of hardcoding zsh when running exec
Browse files Browse the repository at this point in the history
  • Loading branch information
ceuk committed Sep 25, 2024
1 parent 9743ba6 commit afca3b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func getGitCommits(filePath string) ([]list.Item, error) {

func getGitDiff(commit, filePath string) (string, error) {
cmd := fmt.Sprintf("git show %s -- %s | git-split-diffs --color | sed '/─/,$!d' | tail -n +5", commit, filePath)
output, err := exec.Command("zsh", "-c", cmd).Output()
output, err := exec.Command(os.Getenv("SHELL"), "-c", cmd).Output()
if err != nil {
return "", err
}
Expand Down

0 comments on commit afca3b4

Please sign in to comment.