uiop:launch-program fails to run sudo without -S
Jason Miller
jason at milr.com
Wed Jan 20 22:43:16 UTC 2021
On Tue, 12 Jan 2021 19:14:15 +0100 Pierre Neidhardt <mail at ambrevar.xyz> wrote:
> Thanks for sharing, this could be interesting indeed.
> How would you run it in SLY or SLIME then? Do you have an example recipe?
Oh, I missed this e-mail somehow. Here's an example:
(with-input-from-string (s (format nil "mypassword~%"))
(uiop:run-program '("script" "-c" "sudo ls") :input s :output :string))
Notes:
1. sudo does have "-S" to prevent it from requiring a pty, but this was the
original question, so it's what I used.
2. The parameter to "-c" ("sudo ls" above) will be interpreted by the shell.
More information about the asdf-devel
mailing list