Skip to content

Commit

Permalink
Merge pull request #45 from ebobby/fix-daemon-args
Browse files Browse the repository at this point in the history
Daemon flags fixed.
  • Loading branch information
mmstick committed Sep 24, 2018
2 parents 7f5de18 + b75135d commit 821cc23
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,22 @@ fn main() {
)
)
.get_matches();

if let Err(why) = logging::setup_logging(
if matches.is_present("verbose") {
LevelFilter::Debug
} else if matches.is_present("quiet") {
LevelFilter::Off
} else {
LevelFilter::Info
}
) {
eprintln!("failed to set up logging: {}", why);
process::exit(1);
}

let res = match matches.subcommand() {
("daemon", Some(_matches)) => {
("daemon", Some(matches)) => {
if let Err(why) = logging::setup_logging(
if matches.is_present("verbose") {
LevelFilter::Debug
} else if matches.is_present("quiet") {
LevelFilter::Off
} else {
LevelFilter::Info
}
) {
eprintln!("failed to set up logging: {}", why);
process::exit(1);
}

if unsafe { libc::geteuid() } == 0 {
daemon::daemon(matches.is_present("experimental"))
} else {
Expand Down

0 comments on commit 821cc23

Please sign in to comment.