Skip to content

Commit 689a97c

Browse files
0xrinegadeCopilot
authored andcommitted
Update src/commands/snapshot.rs
Co-authored-by: Copilot <[email protected]>
1 parent ea3bb0a commit 689a97c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commands/snapshot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ fn get_snapshot_dir(matches: &ArgMatches) -> Result<PathBuf> {
181181
}
182182

183183
fn get_output_config(matches: &ArgMatches) -> Result<OutputConfig> {
184-
// Check environment variable for NO_COLOR or flag
185-
let colorized = std::env::var("NO_COLOR").is_err();
184+
// Check both --no-color flag and NO_COLOR environment variable
185+
let colorized = !matches.get_flag("no-color") && std::env::var("NO_COLOR").is_err();
186186

187187
Ok(OutputConfig {
188188
format: if matches.get_flag("json") {

0 commit comments

Comments
 (0)