rust-playground icon indicating copy to clipboard operation
rust-playground copied to clipboard

Explicitly Enable Colored Output in Cargo Command Execution

Open 08volt opened this issue 8 months ago • 0 comments

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.

08volt avatar Feb 20 '25 08:02 08volt