aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-02-23 13:36:25 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-02-23 13:36:50 -0700
commite969e942985c7a5afdeda3c1d8334c9aa5b2d3d5 (patch)
treee04369e99fcdb789ae2b441a78130d7af50b811e
parent8edaf3ba10d7e03fe4ef78e47494c07f1674e6ce (diff)
downloadconsfigurator-e969e942985c7a5afdeda3c1d8334c9aa5b2d3d5.tar.gz
fix a few calls to RUN
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/connection/ssh.lisp2
-rw-r--r--src/connection/sudo.lisp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/connection/ssh.lisp b/src/connection/ssh.lisp
index faa16a9..c6acfee 100644
--- a/src/connection/ssh.lisp
+++ b/src/connection/ssh.lisp
@@ -52,7 +52,7 @@
(defmethod connection-run ((c ssh-connection) cmd &optional input)
(multiple-value-bind (out err exit)
- (run :input input (sshcmd c cmd))
+ (run :may-fail :input input (sshcmd c cmd))
(values (strcat err out) exit)))
(defmethod connection-readfile ((c ssh-connection) path)
diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp
index c54ff14..71eecd5 100644
--- a/src/connection/sudo.lisp
+++ b/src/connection/sudo.lisp
@@ -89,7 +89,7 @@
(t
nil))))
(multiple-value-bind (out err exit-code)
- (run :input new-input (sudocmd c cmd))
+ (run :may-fail :input new-input (sudocmd c cmd))
(values (strcat err out) exit-code))))
(defmethod connection-readfile ((c sudo-connection) path)
@@ -102,7 +102,7 @@
(error "File ~S not readable" path))))
(defmethod connection-writefile ((c sudo-connection) path contents)
- (run :input contents (sudocmd c "cat" #?">$(path)")))
+ (connection-run c #?"cat >$(path)" contents))
(defmethod connection-upload ((c sudo-connection) from to)
(run (sudocmd c "cp" from to)))