Skip to content

Commit

Permalink
review feeback: only alter program if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
lread committed Jul 26, 2024
1 parent eb4a3c5 commit 7fe7ce3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/babashka/process.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,13 @@

(fs/parent program)
(if dir
(fs/which (fs/file dir program))
;; we need to absolutize here to overcome a bug in Windows ProcessBuilder
(some-> (fs/which (fs/file dir program)) fs/absolutize)
(fs/which program))

:else
(fs/which program))]
(-> resolved fs/absolutize fs/normalize str)
(str resolved)
(throw (ex-info (str "Cannot resolve program: " program) {}))))

(defn ^:no-doc default-program-resolver
Expand Down

0 comments on commit 7fe7ce3

Please sign in to comment.