mirror of
https://github.com/logseq/logseq.git
synced 2026-05-18 01:42:19 +00:00
fix(cli): custom-query fails if name is a keyword
Bug caused by name binding masking core name fn. Wouldn't have this bug if there weren't so many :shadowed-var exclusions in clj-kondo/config.edn. With --verbose, also show stack for exceptions. Leads to faster fixing for us (and LLMs)
This commit is contained in:
@@ -92,9 +92,9 @@
|
||||
{:ok? true :value parsed})))
|
||||
|
||||
(defn- normalize-query-name
|
||||
[name]
|
||||
(when (some? name)
|
||||
(let [raw (if (keyword? name) (name name) (str name))
|
||||
[name']
|
||||
(when (some? name')
|
||||
(let [raw (if (keyword? name') (name name') (str name'))
|
||||
text (string/trim raw)]
|
||||
(when (seq text) text))))
|
||||
|
||||
|
||||
@@ -70,7 +70,10 @@
|
||||
(fn []
|
||||
(format/format-result {:status :error
|
||||
:error {:code (or (:code data) :exception)
|
||||
:message message}}
|
||||
:message (str message
|
||||
(when (get-in parsed [:options :verbose])
|
||||
(str "\nStacktrace:\n"
|
||||
(.-stack error))))}}
|
||||
cfg)))}))))
|
||||
|
||||
(defn ^:large-vars/cleanup-todo run!
|
||||
|
||||
Reference in New Issue
Block a user