Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/babashka/fs.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@
(into [nil] exts)
exts))
[nil])
paths (or (:paths opts) (babashka.fs/exec-paths))
paths (or (:paths opts) (exec-paths))
;; if program is exactly a file name, then search all the path entries
;; otherwise, only search relative to current directory (absolute paths will throw)
candidate-paths (if (filename-only? program)
Expand All @@ -1115,9 +1115,9 @@
(if (seq exts)
(let [ext (first exts)
program (str program (when ext (str "." ext)))
f (if (babashka.fs/relative? program)
(babashka.fs/path p program)
(babashka.fs/path program))]
f (if (relative? program)
(path p program)
(path program))]
(if (and (executable? f) (not (directory? f)))
(recur (rest exts)
(conj candidates f))
Expand Down