* Fix #1818: wrong argument order in clojure.java.io/resource * fix
This commit is contained in:
parent
238a98d9b2
commit
8052618fa8
3 changed files with 4 additions and 3 deletions
|
|
@ -9,6 +9,7 @@ A preview of the next release can be installed from
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- [#1818](https://github.com/babashka/babashka/issues/1818): wrong argument order in `clojure.java.io/resource` implementation
|
||||||
- Add `java.text.BreakIterator`
|
- Add `java.text.BreakIterator`
|
||||||
- Bump `fs` to `0.5.25`
|
- Bump `fs` to `0.5.25`
|
||||||
- Bump `jsoup` to `1.20.1`
|
- Bump `jsoup` to `1.20.1`
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@
|
||||||
cp)))
|
cp)))
|
||||||
|
|
||||||
(defn resource
|
(defn resource
|
||||||
(^URL [path] (resource @the-url-loader path))
|
(^URL [path] (resource path @the-url-loader))
|
||||||
(^URL [loader path]
|
(^URL [path loader]
|
||||||
(if (str/starts-with? path "/") nil ;; non-relative paths always return nil
|
(if (str/starts-with? path "/") nil ;; non-relative paths always return nil
|
||||||
(getResource loader [path] true))))
|
(getResource loader [path] true))))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1190,7 +1190,7 @@ Use bb run --help to show this help output.
|
||||||
(println "[babashka] WARNING: config file does not exist:" config))
|
(println "[babashka] WARNING: config file does not exist:" config))
|
||||||
nil))
|
nil))
|
||||||
jar (let [jar (resolve-symbolic-link jar)]
|
jar (let [jar (resolve-symbolic-link jar)]
|
||||||
(some-> [jar] cp/new-loader (cp/resource "META-INF/bb.edn") .toString))
|
(some->> [jar] cp/new-loader (cp/resource "META-INF/bb.edn") .toString))
|
||||||
:else (if (and file (fs/exists? file))
|
:else (if (and file (fs/exists? file))
|
||||||
;; file relative to bb.edn
|
;; file relative to bb.edn
|
||||||
(let [file (abs-path file) ;; follow symlink
|
(let [file (abs-path file) ;; follow symlink
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue