harbor run -t openthoughts/tasktrove-exp-rpt-stack-rust-v2-stack-rust-0351harbor download openthoughts/tasktrove-exp-rpt-stack-rust-v2-stack-rust-0351Task Description:
Implement a command-line utility in Rust that processes various commands and arguments according to the specifications outlined in the provided test cases. The utility should manage how commands are executed and handle arguments for command execution, errors, environment variables, and overrides.
Command Execution:
--command argument and execute it.--command flag.Error Handling:
--command is provided without a corresponding command value, return an error message indicating that a command is required, following the format specified in the no_binary test case. The exit status should be 1 (EXIT_FAILURE).command_not_found test case, and also return a non-success exit status.Environment Variables:
$DOTENV_KEY and FOO) can be accessed and utilized in the commands executed by the utility. The test cases should validate this functionality.Overrides:
--set flag. The overrides should correctly apply when the command is executed, as validated by the set_overrides_work test case.Shell Execution:
sh or other defined shells. The output should align with expected outputs for the given commands.Standard Output and Error:
Directory Handling:
Shell Command Execution:
--shell-command, which executes the command provided with this argument. The expected output should match that of the command executed without this flag.Implement the functionality in the /app/ directory of the Rust project. Ensure that all the above requirements are met so that the provided test cases will pass successfully.