aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-02-28 15:48:11 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-02-28 15:48:11 -0700
commit78d8f9dad92966a344ce71e12f1deb33a28f0ec3 (patch)
tree4b6d961527f039b462efb33c6c952a48e0be62d0
parent649439ee3e7c05eb604f81b6c6d8eb76ac86aa6e (diff)
downloadconsfigurator-78d8f9dad92966a344ce71e12f1deb33a28f0ec3.tar.gz
move properties type check into EVAL-PROPSPEC
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/deployment.lisp9
-rw-r--r--src/propspec.lisp3
2 files changed, 5 insertions, 7 deletions
diff --git a/src/deployment.lisp b/src/deployment.lisp
index 2b96f80..395cec8 100644
--- a/src/deployment.lisp
+++ b/src/deployment.lisp
@@ -126,13 +126,8 @@ DEFHOST forms can override earlier entries (see DEFHOST's docstring)."
(apply #'establish-connection type remaining args)))
(if remaining
(connect remaining)
- (apply-propspec (slot-value *host* 'propspec)))
- (connection-teardown *connection*))))
- (apply-propspec (propspec)
- (when (and (subtypep (class-of *connection*) 'posix-connection)
- (eq :lisp (propspec->type propspec)))
- (error "Cannot apply :LISP properties using a POSIX connection"))
- (eval-propspec propspec)))
+ (eval-propspec (slot-value *host* 'propspec)))
+ (connection-teardown *connection*)))))
(connect (loop for connection in (ensure-cons connections)
collect (apply #'preprocess-connection-args
(ensure-cons connection)))))))
diff --git a/src/propspec.lisp b/src/propspec.lisp
index 22bd579..987f2c6 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -143,6 +143,9 @@ an atomic property application."
(defun eval-propspec (propspec)
"Apply properties as specified by PROPSPEC."
+ (when (and (subtypep (class-of *connection*) 'posix-connection)
+ (eq :lisp (propspec->type propspec)))
+ (error "Cannot apply :LISP properties using a POSIX connection"))
(loop for system in (slot-value propspec 'systems)
unless (asdf:component-loaded-p system)
do (restart-case (asdf:load-system system)