Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Fix partial matching for the --seed flag
Vincenzo Palazzo committed 2 years ago
commit f91ef2963e4da79dccbcc11e4fb1792f6b857107
parent f418b5268c135ae296659f91e87eb07b6f35330d
1 file changed +5 -1
modified radicle-cli/src/commands/sync.rs
@@ -79,7 +79,7 @@ impl Args for Options {
                Long("verbose") | Short('v') => {
                    verbose = true;
                }
-
                Long("seed") if matches!(mode, SyncMode::Fetch) => {
+
                Long("seed") => {
                    let val = parser.value()?;
                    let val = term::args::nid(&val)?;
                    seed = Some(val);
@@ -108,6 +108,10 @@ impl Args for Options {
            }
        }

+
        if seed.is_some() && mode != SyncMode::Fetch {
+
            anyhow::bail!("`--seed` must be used with `--fetch`");
+
        }
+

        Ok((
            Options {
                rid,