Fix conditional default-directory

This commit is contained in:
Steve Purcell 2014-01-31 08:39:28 +00:00
parent 0c167860b3
commit bfba389ab0

View file

@ -148,7 +148,7 @@ function for access to this function")
(defun pb/run-process (dir command &rest args)
"In DIR (or `default-directory' if unset) run COMMAND with ARGS.
Output is written to the current buffer."
(let* ((default-directory (or (file-name-as-directory dir) default-directory))
(let* ((default-directory (file-name-as-directory (or dir default-directory)))
(have-timeout (executable-find "timeout"))
(argv (if have-timeout
(append (list "timeout" "-k" "60" "600" command) args)