Skip to content

Commit

Permalink
Fix panic when displaying scripts in diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Mar 17, 2021
1 parent 93d5695 commit 0b8b5b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/chezmoi/gitdiffsystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (s *GitDiffSystem) RunCmd(cmd *exec.Cmd) error {
// RunScript implements System.RunScript.
func (s *GitDiffSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte) error {
mode := os.FileMode(filemode.Executable)
diffPatch, err := DiffPatch(s.trimPrefix(AbsPath(scriptname)), nil, mode, data, mode)
diffPatch, err := DiffPatch(scriptname, nil, mode, data, mode)
if err != nil {
return err
}
Expand Down

0 comments on commit 0b8b5b0

Please sign in to comment.