Closed liuyinz closed 3 years ago
;; HACK fix easy-hugo--view
(defun easy-hugo--version-patch ()
"Return the version of hugo."
(let ((source (split-string
(with-temp-buffer
(shell-command-to-string (concat easy-hugo-bin " version")))
" ")))
(string-to-number (substring (nth 1 source) 1))))
(advice-add 'easy-hugo--version :override #'easy-hugo--version-patch)
For now ,I just add the advide to use, change to (substring (nth 1 source)
Solved by d5c4e0fef47716ec8eef1bb22db91054a3b51af7
@liuyinz Thanks a lot.
hugo version :
("hugo" "v0.81.0+extended" "darwin/amd64" "BuildDate=unknown")
Debug: Debugger entered--Lisp error: (wrong-type-argument arrayp nil) substring(nil 1) (string-to-number (substring (nth 4 source) 1)) (let ((source (split-string (let ((temp-buffer (generate-new-buffer " temp" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ...) (and ... ...)))) " "))) (string-to-number (substring (nth 4 source) 1))) easy-hugo--version() (progn (easy-hugo--version))