Skip to content

Commit

Permalink
Hard-code built-in tasks.
Browse files Browse the repository at this point in the history
Fixes #2345
  • Loading branch information
technomancy committed Oct 27, 2017
1 parent 1c6d3ea commit 4c7f037
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions leiningen-core/src/leiningen/core/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,21 @@
(range s-len))]
(peek (peek matrix))))

;; workaround for #2345; need to update this list if a new task is added
(def ^:private stock-tasks
'[leiningen.change leiningen.check leiningen.classpath leiningen.clean
leiningen.compile leiningen.deploy leiningen.deps leiningen.do
leiningen.help leiningen.install leiningen.jar leiningen.javac leiningen.new
leiningen.plugin leiningen.pom leiningen.release leiningen.repl
leiningen.retest leiningen.run leiningen.search leiningen.show-profiles
leiningen.test leiningen.trampoline leiningen.uberjar leiningen.update-in
leiningen.upgrade leiningen.vcs leiningen.version leiningen.with-profile])

(defn tasks
"Return a list of symbols naming all visible tasks."
[]
(->> (b/namespaces-on-classpath :prefix "leiningen")
(into stock-tasks)
(filter #(re-find #"^leiningen\.(?!core|main|util)[^\.]+$" (name %)))
(distinct)
(sort)))
Expand Down

0 comments on commit 4c7f037

Please sign in to comment.