From b0ce680fda36b49b40a988d1f6410b99a170f0f8 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Mon, 29 Jan 2024 12:15:43 +0100 Subject: [PATCH] Fix #1661: follow symlink --- src/babashka/main.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/babashka/main.clj b/src/babashka/main.clj index b4f48ddb..3dc4bb22 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -1162,7 +1162,8 @@ Use bb run --help to show this help output. jar (some-> [jar] cp/new-loader (cp/resource "META-INF/bb.edn") .toString) :else (if (and file (fs/exists? file)) ;; file relative to bb.edn - (let [rel-bb-edn (fs/file (fs/parent file) "bb.edn")] + (let [file (fs/real-path file) ;; follow symlink + rel-bb-edn (fs/file (fs/parent file) "bb.edn")] (if (fs/exists? rel-bb-edn) (abs-path rel-bb-edn) ;; fall back to local bb.edn