Module garden::cmd

source · []
Expand description

Command utilities

Functions

Return a CaptureData result for a subprocess’s stdout.

Return the current executable path.

Return a subprocess::Exec for a command.

Run a command in the specified tree context. Parameters:

Return a subprocess::Exec that runs a command in the specified directory.

Parse arguments or exit with an error.

The command might be a path that only exists inside the resolved environment. Resolve the path by looking for the presence of PATH and updating the command when it exists.

Convert an exit status to Result<(), GardenError>.

Return a subprocess::Exec instance from a command vector.

Split a vector into two vectors – pre-dash and post-dash

Extract the return status from subprocess::Resultsubprocess::ExitStatus.

Take a subprocess capture and return a string without trailing whitespace.