Skip to content

Commit

Permalink
cargo-insta: edit reject message (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospb19 authored Sep 16, 2023
1 parent 7e9315e commit 6e22d67
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions cargo-insta/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,21 @@ fn query_snapshot(
style("a").green().bold(),
style("keep the new snapshot").dim()
);
println!(
" {} reject {}",
style("r").red().bold(),
style("keep the old snapshot").dim()
);

if old.is_some() {
println!(
" {} reject {}",
style("r").red().bold(),
style("retain the old snapshot").dim()
);
} else {
println!(
" {} reject {}",
style("r").red().bold(),
style("reject the new snapshot").dim()
);
}

println!(
" {} skip {}",
style("s").yellow().bold(),
Expand Down

0 comments on commit 6e22d67

Please sign in to comment.