Skip to content

Commit

Permalink
Make sure only one macaroon file is given
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Oct 2, 2024
1 parent 7ef53e1 commit d36e555
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ pub struct Config {

impl Config {
pub fn macaroon_file(&self) -> String {
if self.macaroon_file.is_some() && self.invoice_macaroon_file.is_some() {
panic!("cannot set --macaroon-file and --invoice-macaroon-file at the same time")
}
match self.invoice_macaroon_file {
Some(_) => self.invoice_macaroon_file.clone().unwrap(),
None => self
Expand Down

0 comments on commit d36e555

Please sign in to comment.