Fork me on GitHub
#tools-build
<
2021-11-19
>
ericdallo02:11:32

I have a function like:

(defn tag [{:keys [version]}] ...)
And when I try clj -T:build tag :version "1.2.3" it gives me a Unreadable arg: "1.2.3" , am I missing something? I didn't find a example on tools.build guide passing anything other than a keyword so not sure if that is suppose to work

ericdallo02:11:17

It works if I pass clj -T:build tag :version :1.2.3 but it looks a little bit weird

Alex Miller (Clojure team)03:11:57

when passing strings, you need to include the outer quotes in the literal value

Alex Miller (Clojure team)03:11:14

clj -T:build tag :version '"1.2.3"'

ericdallo03:11:57

Oh, I missed that, thank you! it works

seancorfield22:11:29

Friday win: today we replaced half our ancient ant build.xml and snapshot.sh scripts with a couple of tools.build-based functions! (the rest of that mess deals specifically with our legacy apps which will eventually get replaced by shiny Clojure 🙂 )