Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly Enable Colored Output in Cargo Command Execution #1140

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

08volt
Copy link

@08volt 08volt commented Feb 20, 2025

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 08volt marked this pull request as draft February 20, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant