Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow overriding :exec-fn when used via clj -M #48

Closed
mk opened this issue Oct 12, 2022 · 1 comment
Closed

allow overriding :exec-fn when used via clj -M #48

mk opened this issue Oct 12, 2022 · 1 comment

Comments

@mk
Copy link

mk commented Oct 12, 2022

Given the following deps.edn:

{:aliases {:foo {:extra-deps {org.babashka/cli {:mvn/version "0.4.38"}}
                 :exec-fn clojure.core/prn
                 :main-opts ["-m" "babashka.cli.exec"]}}}

I can override the :exec-fn when using clj -X:

mk@studio ~/d/cli-exec-fn> clj -X:foo :my-string '"foo"'
{:my-string "foo"}

mk@studio ~/d/cli-exec-fn> clj -X:foo clojure.core/println :my-string '"foo"'
{:my-string foo}

But not when using babashka.cli via clj -M:

mk@studio ~/d/cli-exec-fn> clj -M:foo --my-string foo
{:my-string "foo"}

mk@studio ~/d/cli-exec-fn> clj -M:foo clojure.core/println --my-string foo
{:my-string "foo"}

It would be nice if this could be supported.

@borkdude
Copy link
Contributor

Fixed in v0.4.39

borkdude added a commit that referenced this issue Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants