mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES
This commit is contained in:
@ -22,13 +22,13 @@
|
||||
"Runs a shell command and prints any output to the DOOM buffer."
|
||||
(let ((cmd-list (split-string command " ")))
|
||||
(cond ((equal (car cmd-list) "sudo")
|
||||
(apply 'doom-sudo (s-join " " (cdr cmd-list)) args))
|
||||
(apply #'doom-sudo (string-join (cdr cmd-list) " ") args))
|
||||
((let ((bin (executable-find "npm")))
|
||||
(and (file-exists-p bin)
|
||||
(not (file-writable-p bin))))
|
||||
(apply 'doom-sudo (s-join " " cmd-list) args))
|
||||
(apply #'doom-sudo (string-join cmd-list " ") args))
|
||||
(t
|
||||
(princ (shell-command-to-string (apply 'format command args)))))))
|
||||
(princ (shell-command-to-string (apply #'format command args)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-sudo (command &rest args)
|
||||
@ -37,7 +37,7 @@
|
||||
(with-current-buffer (get-buffer-create "*doom-sudo*")
|
||||
(unless (string-prefix-p "/sudo::/" default-directory)
|
||||
(cd "/sudo::/"))
|
||||
(princ (shell-command-to-string (apply 'format command args))))))
|
||||
(princ (shell-command-to-string (apply #'format command args))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-fetch (fetcher location dest)
|
||||
|
Reference in New Issue
Block a user