I was just writing a shell script that basically executes some other programs and does things like:
these are all totally things basic-cli
could do, at which point I could rewrite that shell script in Roc, which would be awesome :smiley:
is anyone interested in getting involved in implementing process running support for basic-cli
?
Made a start on PR #55 to add a Command module to basic-cli
to do the above. It's still a WIP but I've ran into an issue and not sure if there is a problem here or not. I've been trying to diagnose why the current examples/command.roc
which just runs "ls" on the local folder seems to fail with a non-zero exit code.
% roc dev examples/command.roc
🔨 Rebuilding platform...
LICENSE examples flake.lock src
README.md file-test flake.nix
ci file-testBROKEN.roc generated-docs
Command failed with status code 1275068420
I'm pretty sure I'm not quite understanding how to do std::processs::Command
things properly, specifically how child processes interact here. Should calling another program from rust give the exit code returned from the child process?
I'm not sure what I was doing wrong here, but I've moved on and updated it to status : Command -> Task U8 *
which seems to be working as expected now.
Last updated: Jul 05 2025 at 12:14 UTC