Are key values for -X
not automatically strings? I’m doing the call:
clj -X:deploy :artifact "cljc-shuffle.jar"
And I’ve noticed that slipset/deps-deploy
i am running is explicitly converting :artifact
value to string, via (str artifact)
No, this is very annoying, you have to write '"foo"'
so what does foo
produce in the program? A symbol foo
?
yes
all args are read as edn strings
How do cmd line args and :exec-args
combine? I’ve had this:
:deploy {:extra-deps {slipset/deps-deploy {:mvn/version "0.1.5"}}
:exec-fn deps-deploy.deps-deploy/deploy
:exec-args {:installer :remote :artifact "cljc-shuffle.jar"
:sign-releases? true}}
If I run, clj -X:deploy
it worked. Then I tried to specify artifact on cmd. So I removed it from deps and ran:
clj -X:deploy :artifact "'cljc-shuffle.jar'"
and then I get
Execution error (IllegalArgumentException) at java.lang.reflect.Array/set (Array.java:-2).
array element type mismatch
do command line arguments replace :exec-args in full?
No they are additive. I would have expected that to work
Oh wait, no. Your arg is wrong.
Use '"string"'
Strings require double quotes. Then you need single quotes around that for the shell
FYI to tool authors, such as @slipset since deps-deploy
was mentioned, for convenience of use I have been allowing symbols where strings are expected so that if users could write the argument without quotes, they are able to do so. For a local JAR file such as cljc-shuffle.jar
you could just pass a symbol in and the code could convert the symbol to a string. Obviously, if you're passing in a path, that's generally not going to be a legal symbol and you are going to have to quote '
and double-quote "
it.
Ah yes, the symbol fix isn’t released yet for deps-deploy