rust-playground
rust-playground copied to clipboard
Explicitly Enable Colored Output in Cargo Command Execution
This PR ensures that the CARGO_TERM_COLOR environment variable is set to always when invoking the cargo command via the execute_cargo_request function. This change forces cargo to output colored terminal output, enhancing readability and user experience, regardless of the terminal's auto-detection.
Specifically, the following change was made:
Added envs.insert("CARGO_TERM_COLOR".to_owned(), "always".to_owned()); to the execute_cargo_request function to explicitly set the environment variable. This change improves the consistency of the output and ensures that users receive colored output when running cargo commands through this API.