Stream: contributing

Topic: running processes in basic-cli


view this post on Zulip Richard Feldman (Jun 14 2023 at 12:21):

I was just writing a shell script that basically executes some other programs and does things like:

view this post on Zulip Richard Feldman (Jun 14 2023 at 12:21):

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:

view this post on Zulip Richard Feldman (Jun 14 2023 at 12:22):

is anyone interested in getting involved in implementing process running support for basic-cli?

view this post on Zulip Luke Boswell (Jun 18 2023 at 10:14):

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

view this post on Zulip Luke Boswell (Jun 18 2023 at 10:18):

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?

view this post on Zulip Luke Boswell (Jun 18 2023 at 11:05):

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