[#807] Ignore local and global deps.edn
This commit is contained in:
parent
f2ec857c66
commit
66867e1ddb
2 changed files with 9 additions and 1 deletions
|
|
@ -65,7 +65,10 @@
|
|||
:classpath-overrides {org.clojure/clojure ""
|
||||
org.clojure/spec.alpha ""
|
||||
org.clojure/core.specs.alpha ""}})
|
||||
args ["-Spath" "-Sdeps" (str deps-map)]
|
||||
args ["-Srepro" ;; do not include deps.edn from user config
|
||||
"-Spath" "-Sdeps" (str deps-map)
|
||||
"-Sdeps-file" "" ;; we reset deps file so the local deps.edn isn't used
|
||||
,]
|
||||
args (conj args (str "-A:" (str/join ":" (cons ":org.babashka/defaults" aliases))))
|
||||
cp (with-out-str (apply deps/-main args))
|
||||
cp (str/trim cp)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@
|
|||
(test-utils/with-config '{:deps {medley/medley {:mvn/version "1.3.0"}}}
|
||||
(is (= '{1 {:id 1}, 2 {:id 2}}
|
||||
(bb "-e" "(require 'medley.core)" "-e" "(medley.core/index-by :id [{:id 1} {:id 2}])"))))
|
||||
(test-utils/with-config '{:deps {medley/medley {:mvn/version "1.3.0"}}}
|
||||
(let [cp (bb "-e" "(do (require '[babashka.classpath :as cp])
|
||||
(cp/split-classpath (cp/get-classpath)))")]
|
||||
(is (= 1 (count cp)))
|
||||
(is (str/includes? (first cp) "medley"))))
|
||||
(testing "--classpath option overrides bb.edn"
|
||||
(test-utils/with-config '{:deps {medley/medley {:mvn/version "1.3.0"}}}
|
||||
(is (= "src"
|
||||
|
|
|
|||
Loading…
Reference in a new issue