Просмотр исходного кода

fix: CLI regression on config path (#457)

* Fix libgit2-sys vuln by upgrading vergen

* Remove atty dependency (unmaintained)

* Update clap to version 4

* Remove rustls-pemfile dependency (unmaintained)

* Fix rustls issues

Restore rustls-native-certs and upgrade version
Switch to tokio_rustlrs pki_types

* Run cargo fmt

* Test single threading tests

* Fix use of rustls-native-certs

* Update packages to resolve vulnerabilities

* Fix CLI regression and add test
Stephen Tierney 6 дней назад
Родитель
Сommit
b99b05387e
1 измененных файлов с 12 добавлено и 1 удалено
  1. 12 1
      src/cli.rs

+ 12 - 1
src/cli.rs

@@ -50,7 +50,7 @@ pub struct Cli {
     ///
     /// Running as a client or a server is automatically determined
     /// according to the configuration file.
-    #[arg(value_name = "CONFIG")]
+    #[arg(id = "CONFIG", value_name = "CONFIG")]
     pub config_path: Option<std::path::PathBuf>,
 
     /// Run as a server
@@ -73,3 +73,14 @@ pub struct Cli {
     )]
     pub genkey: Option<Option<KeypairType>>,
 }
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use clap::CommandFactory;
+
+    #[test]
+    fn cli_is_valid() {
+        Cli::command().debug_assert();
+    }
+}