diff --git a/radicle-cli/examples/rad-init-sync.md b/radicle-cli/examples/rad-init-sync.md index d7cc0106..3ae61837 100644 --- a/radicle-cli/examples/rad-init-sync.md +++ b/radicle-cli/examples/rad-init-sync.md @@ -8,11 +8,6 @@ $ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" - Initializing local 🌱 project in . ✓ Project heartwood created -{ - "name": "heartwood", - "description": "Radicle Heartwood Protocol & Stack", - "defaultBranch": "master" -} ✓ Syncing inventory.. ✓ Announcing inventory.. diff --git a/radicle-cli/examples/rad-init.md b/radicle-cli/examples/rad-init.md index 0b9c0526..6d1329f1 100644 --- a/radicle-cli/examples/rad-init.md +++ b/radicle-cli/examples/rad-init.md @@ -3,7 +3,7 @@ To create your first radicle project, navigate to a git repository, and run the `init` command: ``` -$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --no-track +$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --no-track -v Initializing local 🌱 project in . diff --git a/radicle-cli/src/commands/init.rs b/radicle-cli/src/commands/init.rs index e676b8c3..40dc1214 100644 --- a/radicle-cli/src/commands/init.rs +++ b/radicle-cli/src/commands/init.rs @@ -35,6 +35,7 @@ Options --setup-signing Setup the radicle key as a signing key for this repository --announce Announce the new project to the network --no-confirm Don't ask for confirmation during setup + --verbose, -v Verbose mode --help Print help "#, }; @@ -49,6 +50,7 @@ pub struct Options { pub setup_signing: bool, pub set_upstream: bool, pub announce: bool, + pub verbose: bool, pub track: bool, } @@ -67,6 +69,7 @@ impl Args for Options { let mut setup_signing = false; let mut announce = false; let mut track = true; + let mut verbose = false; while let Some(arg) = parser.next()? { match arg { @@ -117,6 +120,9 @@ impl Args for Options { Long("no-track") => { track = false; } + Long("verbose") | Short('v') => { + verbose = true; + } Long("help") => { return Err(Error::Help.into()); } @@ -138,6 +144,7 @@ impl Args for Options { setup_signing, announce, track, + verbose, }, vec![], )) @@ -222,7 +229,9 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()> )); spinner.finish(); - term::blob(json::to_string_pretty(&proj)?); + if options.verbose { + term::blob(json::to_string_pretty(&proj)?); + } if options.set_upstream || git::branch_remote(&repo, proj.default_branch()).is_err() { // Setup eg. `master` -> `rad/master` diff --git a/radicle-httpd/src/test.rs b/radicle-httpd/src/test.rs index 9f7e5146..d3a65691 100644 --- a/radicle-httpd/src/test.rs +++ b/radicle-httpd/src/test.rs @@ -97,6 +97,7 @@ pub fn seed(dir: &Path) -> Context { set_upstream: false, announce: false, track: false, + verbose: false, }, &profile, )