Skip to content

Commit

Permalink
Fix panic when blame-palette is empty (#1737)
Browse files Browse the repository at this point in the history
* Fix panic when blame-palette is empty

* Move check to config.rs
  • Loading branch information
thorio authored Jul 8, 2024
1 parent d7a22a7 commit 716fa79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ impl From<cli::Opt> for Config {

let blame_palette = make_blame_palette(opt.blame_palette, opt.computed.is_light_mode);

if blame_palette.is_empty() {
fatal("Option 'blame-palette' must not be empty.")
}

let file_added_label = opt.file_added_label;
let file_copied_label = opt.file_copied_label;
let file_modified_label = opt.file_modified_label;
Expand Down

0 comments on commit 716fa79

Please sign in to comment.