Skip to content

Commit cdbf849

Browse files
author
ekzyis
committed
Make sure only one macaroon file is given
1 parent d40aba8 commit cdbf849

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ pub struct Config {
4242

4343
impl Config {
4444
pub fn macaroon_file(&self) -> String {
45+
if self.macaroon_file.is_some() && self.invoice_macaroon_file.is_some() {
46+
panic!("cannot set --macaroon-file and --invoice-macaroon-file at the same time")
47+
}
4548
match self.invoice_macaroon_file {
4649
Some(_) => self.invoice_macaroon_file.clone().unwrap(),
4750
None => self

0 commit comments

Comments
 (0)