Make second argument of run-sudo-command optional

This commit is contained in:
Jeremy Dormitzer 2020-03-08 10:41:51 -04:00
parent fd819e2bd6
commit 226271860c

View File

@ -15,10 +15,10 @@
"Prompts the user for a password"
(read-one-line (current-screen) prompt :password t))
(defmacro run-sudo-command (cmd)
(defmacro run-sudo-command (cmd &optional collect-output-p)
`(run-shell-command
(format nil "SUDO_ASKPASS=~~/bin/stumpwm-sudo.sh sudo -A ~S" ,cmd)
t))
,collect-output-p))
;; Commands
(defcommand shutdown () ()