diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-22 09:38:57 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-22 09:38:57 -0700 |
commit | f393eeebe8cf6a31ecc2160658bee3d2c895a98b (patch) | |
tree | b6c85fc026ffafc58f3c1479efadebb8ba699934 /src/connection/local.lisp | |
parent | 2063385338300dfb11cd1a681ba0ca9e7b1aaf37 (diff) | |
download | consfigurator-f393eeebe8cf6a31ecc2160658bee3d2c895a98b.tar.gz |
untabify
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection/local.lisp')
-rw-r--r-- | src/connection/local.lisp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/connection/local.lisp b/src/connection/local.lisp index a689881..68705b0 100644 --- a/src/connection/local.lisp +++ b/src/connection/local.lisp @@ -37,8 +37,8 @@ root Lisp is running on, as the root Lisp's uid.")) (multiple-value-bind (output _ exit-code) ;; call sh(1) so we know we'll get POSIX (run-program `("sh" "-c" ,shell-cmd) - :input input :output :string - :error-output :output :ignore-error-status t) + :input input :output :string + :error-output :output :ignore-error-status t) (declare (ignore _)) (values output exit-code))) @@ -46,25 +46,25 @@ root Lisp is running on, as the root Lisp's uid.")) (read-file-string path)) (defmethod connection-writefile ((connection local-connection) - path - content - mode) + path + content + mode) ;; we cannot use UIOP:WITH-TEMPORARY-FILE etc., because those do not ensure ;; the file is only readable by us, and we might be writing a secret key (with-remote-temporary-file (temp :connection connection - :directory (pathname-directory-pathname path)) + :directory (pathname-directory-pathname path)) (run-program `("chmod" ,(format nil "~O" mode) ,temp)) (etypecase content (string (with-open-file (stream temp :direction :output :if-exists :supersede) - (write-string content stream))) + (write-string content stream))) (stream (let ((type (stream-element-type content))) - (with-open-file (stream temp :direction :output - :if-exists :supersede - :element-type type) - (copy-stream-to-stream content stream :element-type type))))) + (with-open-file (stream temp :direction :output + :if-exists :supersede + :element-type type) + (copy-stream-to-stream content stream :element-type type))))) (run-program `("mv" ,temp ,path)))) (defmethod connection-upload ((connection local-connection) from to) |