diff options
-rw-r--r-- | src/connection/sudo.lisp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp index 75b7ec8..551741f 100644 --- a/src/connection/sudo.lisp +++ b/src/connection/sudo.lisp @@ -81,13 +81,12 @@ (new-input (cond ((and password input) (make-concatenated-stream - (case (stream-element-type input-stream) - (character - password-stream) - (t - (babel-streams:make-in-memory-input-stream - (babel:string-to-octets password :encoding :UTF-8) - :element-type (stream-element-type input-stream)))) + (if (subtypep (stream-element-type input-stream) + 'character) + password-stream + (babel-streams:make-in-memory-input-stream + (babel:string-to-octets password :encoding :UTF-8) + :element-type (stream-element-type input-stream))) input-stream)) (password password-stream) |