diff --git a/src/babashka/process.cljc b/src/babashka/process.cljc index 20a30f4..1fffd81 100644 --- a/src/babashka/process.cljc +++ b/src/babashka/process.cljc @@ -237,6 +237,7 @@ :env :extra-env :escape]} opts + dir (str dir) ;; convert Path or File into String str-fn (comp escape str) cmd (mapv str-fn cmd) cmd (if-let [program-resolver (:program-resolver opts)] diff --git a/test/babashka/process_test.cljc b/test/babashka/process_test.cljc index 66bd644..310f4cc 100644 --- a/test/babashka/process_test.cljc +++ b/test/babashka/process_test.cljc @@ -162,7 +162,7 @@ ;; It would be nice to use clojure, but on Windows the official install ;; is still currently a PowerShell Module, which cannot be spawned directly. ;; So we'll use java. This test assumes that java and javac are on the PATH." - (let [test-dir "target/process-dir-option-test" + (let [test-dir (fs/path "target/process-dir-option-test") java (fs/which "java") java-dir (-> java fs/parent fs/canonicalize str) java-src (-> (fs/file test-dir "UserDir.java") str)