Skip to content

Commit 6d89a57

Browse files
authored
Merge pull request #1096 from jvanz/fix-clap-downcast
fix: clap cannot downcast CLI flags to PathBuf
2 parents aecaeba + 5f206a6 commit 6d89a57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cli.rs

+3
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,22 @@ pub(crate) fn build_cli() -> Command {
8585
.long("cert-file")
8686
.value_name("CERT_FILE")
8787
.env("KUBEWARDEN_CERT_FILE")
88+
.value_parser(clap::builder::PathBufValueParser::new())
8889
.help("Path to an X.509 certificate file for HTTPS"),
8990

9091
Arg::new("key-file")
9192
.long("key-file")
9293
.value_name("KEY_FILE")
9394
.env("KUBEWARDEN_KEY_FILE")
95+
.value_parser(clap::builder::PathBufValueParser::new())
9496
.help("Path to an X.509 private key file for HTTPS"),
9597

9698
Arg::new("client-ca-file")
9799
.long("client-ca-file")
98100
.value_delimiter(',')
99101
.value_name("CLIENT_CA_FILE")
100102
.env("KUBEWARDEN_CLIENT_CA_FILE")
103+
.value_parser(clap::builder::PathBufValueParser::new())
101104
.help("Path to an CA certificate file that issued the client certificate. Required to enable mTLS"),
102105

103106
Arg::new("policies")

0 commit comments

Comments
 (0)