retrogradeorbit / bootleg

Simple template processing command line tool to help build static websites
Eclipse Public License 2.0
254 stars 12 forks source link

nil attribute causes convert-to to fail #69

Open martinklepsch opened 4 years ago

martinklepsch commented 4 years ago
$ bootleg -e '(-> [:div {:class nil}] (convert-to :html))'
bootleg: script error at line , column : Illegal argument: Vector arg to map conj must be a pair

I retrieved the stacktrace below via the pod interface, so I'm not sure if it's too useful.

#error {
 :cause "Vector arg to map conj must be a pair"
 :data {:type java.lang.IllegalArgumentException}
 :via
 [{:type clojure.lang.ExceptionInfo
   :message "Vector arg to map conj must be a pair [at line 1, column 1]"
   :data {:type java.lang.IllegalArgumentException, :line 1, :column 1, :message "Vector arg to map conj must be a pair [at line 1, column 1]"}
   :at [sci.impl.utils$rethrow_with_location_of_node invokeStatic "utils.cljc" 72]}
  {:type clojure.lang.ExceptionInfo
   :message "Vector arg to map conj must be a pair"
   :data {:type java.lang.IllegalArgumentException}
   :at [babashka.pods.impl$processor invokeStatic "impl.clj" 117]}]
 :trace
 [[babashka.pods.impl$processor invokeStatic "impl.clj" 117]
  [babashka.pods.sci$fn__15145$fn__15178 invoke "sci.clj" 63]
  [sci.impl.vars$binding_conveyor_fn$fn__7581 invoke "vars.cljc" 142]
  [clojure.core$binding_conveyor_fn$fn__5758 invoke "core.clj" 2032]
  [clojure.lang.AFn call "AFn.java" 18]
  [java.util.concurrent.FutureTask run "FutureTask.java" 264]
  [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1128]
  [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 628]
  [java.lang.Thread run "Thread.java" 834]
  [com.oracle.svm.core.thread.JavaThreads threadStartRoutine "JavaThreads.java" 517]
  [com.oracle.svm.core.posix.thread.PosixJavaThreads pthreadStartRoutine "PosixJavaThreads.java" 193]]}