Java ProcessBuilder abstracts, but does not fully generalize, behaviour across underlying OS support for process creation. In the case of Windows, it does not resolve a program relative to the specified working dir. This results in file process creation errors due to the program not being found. This change resolves this nuance.
Bump babashka/fs to get updates to which.
Update internal and undocumented program-resolver fn signature. Formerly it expected program now it expects map with key :program and optionally key :dir.
Rewrote dir opt unit tests for better coverage.
We should discover problems when run from babashka.process now rather than accidental coverage offered when running from babashka.
The exec function tests are still a work in progress, so did some manual testing by compiling changes into babashka to verify that changes did not break exec.
Also: fixed parse-args tests that was spawning os-specific 'ls' command. This test is not run from babashka, so we did not see the failure there, but it did fail locally for me. So switched to os-agnostic wee dummy wd.clj script for this one.
Java
ProcessBuilder
abstracts, but does not fully generalize, behaviour across underlying OS support for process creation. In the case of Windows, it does not resolve a program relative to the specified working dir. This results in file process creation errors due to the program not being found. This change resolves this nuance.Bump babashka/fs to get updates to
which
.Update internal and undocumented program-resolver fn signature. Formerly it expected
program
now it expects map with key:program
and optionally key:dir
.Rewrote dir opt unit tests for better coverage. We should discover problems when run from babashka.process now rather than accidental coverage offered when running from babashka.
The
exec
function tests are still a work in progress, so did some manual testing by compiling changes into babashka to verify that changes did not breakexec
.Also: fixed parse-args tests that was spawning os-specific 'ls' command. This test is not run from babashka, so we did not see the failure there, but it did fail locally for me. So switched to os-agnostic wee dummy
wd.clj
script for this one.Closes #126