diff --git a/README.md b/README.md index 5ffb043b..6704e8bd 100644 --- a/README.md +++ b/README.md @@ -361,10 +361,12 @@ dynamically: ``` clojure (require '[babashka.classpath :refer [add-classpath]] - '[clojure.java.shell :refer [sh]]) + '[clojure.java.shell :refer [sh]] + '[clojure.string :as str]) + (def medley-dep '{:deps {medley {:git/url "https://github.com/borkdude/medley" :sha "91adfb5da33f8d23f75f0894da1defe567a625c0"}}}) -(def cp (:out (sh "clojure" "-Spath" "-Sdeps" (str medley-dep)))) +(def cp (-> (sh "clojure" "-Spath" "-Sdeps" (str medley-dep)) :out str/trim)) (add-classpath cp) (require '[medley.core :as m]) (m/index-by :id [{:id 1} {:id 2}]) ;;=> {1 {:id 1}, 2 {:id 2}}