summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2022-06-30 13:39:25 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2022-07-05 13:57:05 +0200
commit4c5543b4e7a1991fa7bdc3263728cf0a05b4f293 (patch)
treeff07aaf9e30ded7261a1cac387d92f0702c4b5f1
parentf2d10d2e657dd2379ac94ba94cd8c2c97e7f9fc4 (diff)
sq: Fix --export arg of sq key generate.
- The handling function of sq key generate treats the --export argument as optional. - Reflect that in the argument definition.
-rw-r--r--sq/src/sq-usage.rs2
-rw-r--r--sq/src/sq_cli.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/sq/src/sq-usage.rs b/sq/src/sq-usage.rs
index 05f2c7fa..09b83c1d 100644
--- a/sq/src/sq-usage.rs
+++ b/sq/src/sq-usage.rs
@@ -404,7 +404,7 @@
//! uploading it to a keyserver.
//!
//! USAGE:
-//! sq key generate [OPTIONS] --export <OUTFILE>
+//! sq key generate [OPTIONS]
//!
//! OPTIONS:
//! -c, --cipher-suite <CIPHER-SUITE>
diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs
index b8e97472..6dc7ec4d 100644
--- a/sq/src/sq_cli.rs
+++ b/sq/src/sq_cli.rs
@@ -1779,7 +1779,8 @@ $ sq key generate --creation-time 20110609T1938+0200 --export noam.pgp
value_name = "OUTFILE",
help = "Writes the key to OUTFILE",
)]
- pub export: String,
+ // TODO this represents a filename, so it should be a Path
+ pub export: Option<String>,
#[clap(
long = "rev-cert",
value_name = "FILE or -",
@@ -1790,6 +1791,7 @@ $ sq key generate --creation-time 20110609T1938+0200 --export noam.pgp
mandatory if OUTFILE is \"-\". \
[default: <OUTFILE>.rev]",
)]
+ // TODO this represents a filename, so it should be a Path
pub rev_cert: Option<String>
}