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

arity exception when bb tasking with no or an empty task list #1430

Closed
ikappaki opened this issue Nov 26, 2022 · 1 comment · Fixed by #1431
Closed

arity exception when bb tasking with no or an empty task list #1430

ikappaki opened this issue Nov 26, 2022 · 1 comment · Fixed by #1431

Comments

@ikappaki
Copy link
Contributor

ikappaki commented Nov 26, 2022

version

babashka v1.0.165

platform

any

problem

Exception in thread "main" clojure.lang.ArityException: Wrong number of args (0) passed to: clojure.core/max

when bb task'ing with an empty display task list.

A display task list is one that only has tasks with keys that are not symbols or a reprivate or keys start with -.

repro

  1. Create a bb.edn file with a tasks list whose name is not a symbol
{
:tasks {:xyz 1}
}
  1. Run bb tasks

Fails with exception

Exception in thread "main" clojure.lang.ArityException: Wrong number of args (0) passed to: clojure.core/max
	at clojure.lang.AFn.throwArity(AFn.java:429)
	at clojure.lang.RestFn.invoke(RestFn.java:399)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at babashka.impl.tasks$list_tasks.invokeStatic(tasks.clj:435)
	at babashka.main$exec.invokeStatic(main.clj:951)
	at babashka.main$main.invokeStatic(main.clj:1083)
	at babashka.main$main.doInvoke(main.clj:1053)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at babashka.main$_main.invokeStatic(main.clj:1116)
	at babashka.main$_main.doInvoke(main.clj:1108)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at babashka.main.main(Unknown Source)

expected behavior

"No tasks found."

@borkdude
Copy link
Collaborator

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants