Commit 4c6e9ed0 authored by Ben North's avatar Ben North

Avoid error if gitk not found on windows-nt

On windows-nt, if gitk is not in the path, then the 'which' produces
nothing to stdout (although it does produce an error message to
stderr).  The magit-git-string call then returns nil, which is not a
valid input to file-executable-p, causing an error when trying to
autoload anything defined in magit-extras.el.

Include 'exe' as a first conjunct to the 'and', short-circuiting the
file-executable-p test in this case.
parent 22747048
......@@ -39,7 +39,7 @@
(let ((exe (magit-git-string
"-c" "alias.X=!x() { which \"$1\" | cygpath -mf -; }; x"
"X" "gitk.exe")))
(and (file-executable-p exe) exe)))
(and exe (file-executable-p exe) exe)))
(executable-find "gitk") "gitk")
"The Gitk executable."
:group 'magit-extras
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment