Commit 43c4ef9086e5f1034ea5f97c7e24128eeadad0ee

Thomas de Grivel 2019-10-15T16:29:06

simplify run host

diff --git a/core/host.lisp b/core/host.lisp
index fe6cc24..143b56a 100644
--- a/core/host.lisp
+++ b/core/host.lisp
@@ -20,11 +20,7 @@
 
 (defun run (&rest command)
   "Run a command at the current host. COMMAND is assembled using STR."
-  (if (and (boundp '*host*)
-           (symbol-value '*host*))
-      (apply #'host-run *host* command)
-      (with-shell (shell)
-        (apply #'shell-run shell command))))
+  (apply #'host-run (current-host) command))
 
 ;;  localhost
 
@@ -61,9 +57,7 @@
     shell))
 
 (defun current-host ()
-  (or (when (boundp '*host*)
-        (symbol-value '*host*))
-      (localhost)))
+  (or *host* (localhost)))
 
 ;;  Host
 
diff --git a/core/operation.lisp b/core/operation.lisp
index da2e003..033ad60 100644
--- a/core/operation.lisp
+++ b/core/operation.lisp
@@ -90,7 +90,7 @@
            (error 'resource-operation-not-found
                   :resource res
                   :property property
-                  :host (current-host)
+                  :host *host*
                   :os os))
          (pushnew (the operation op) operations)))
     (nreverse operations)))