Browse Source

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 days ago
parent
commit
b99b05387e
1 changed files with 12 additions and 1 deletions
  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
     /// Running as a client or a server is automatically determined
     /// according to the configuration file.
     /// according to the configuration file.
-    #[arg(value_name = "CONFIG")]
+    #[arg(id = "CONFIG", value_name = "CONFIG")]
     pub config_path: Option<std::path::PathBuf>,
     pub config_path: Option<std::path::PathBuf>,
 
 
     /// Run as a server
     /// Run as a server
@@ -73,3 +73,14 @@ pub struct Cli {
     )]
     )]
     pub genkey: Option<Option<KeypairType>>,
     pub genkey: Option<Option<KeypairType>>,
 }
 }
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use clap::CommandFactory;
+
+    #[test]
+    fn cli_is_valid() {
+        Cli::command().debug_assert();
+    }
+}