diff options
| -rw-r--r-- | mullvad-daemon/src/cli.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mullvad-daemon/src/cli.rs b/mullvad-daemon/src/cli.rs index d39a80309e..870b15a624 100644 --- a/mullvad-daemon/src/cli.rs +++ b/mullvad-daemon/src/cli.rs @@ -64,9 +64,8 @@ lazy_static::lazy_static! { } fn create_app() -> App<'static, 'static> { - let app = App::new(crate_name!()) + let mut app = App::new(crate_name!()) .version(version::PRODUCT_VERSION) - .author(crate_authors!(", ")) .about(crate_description!()) .after_help(ENV_DESC.as_str()) .arg( @@ -84,10 +83,15 @@ fn create_app() -> App<'static, 'static> { Arg::with_name("disable_stdout_timestamps") .long("disable-stdout-timestamps") .help("Don't log timestamps when logging to stdout, useful when running as a systemd service") - ); + ); + // A workaround since clap 2 will not fix the deprecation warnings in this macro. + #[allow(deprecated)] + { + app = app.author(crate_authors!(", ")); + } if cfg!(windows) { - app.arg( + app = app.arg( Arg::with_name("run_as_service") .long("run-as-service") .help("Run as a system service. On Windows this option must be used when running a system service"), @@ -96,7 +100,6 @@ fn create_app() -> App<'static, 'static> { .long("register-service") .help("Register itself as a system service"), ) - } else { - app } + app } |
