diff --git a/CHANGELOG.md b/CHANGELOG.md index d1a0b48f..0422424e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Fixed `quill generate` requiring authentication. (#181) - Require an additional `--already-transferred` flag for the single-message form of `quill neuron-stake`. (#173) - Added `--disburse-amount` and `--disburse-to` to `quill neuron-manage`. (#171) - Accepts bare principals and ICRC-1 account IDs in `quill account-balance` and `quill transfer`. (#168) diff --git a/src/main.rs b/src/main.rs index 3bebe4ff..e6e47336 100755 --- a/src/main.rs +++ b/src/main.rs @@ -81,7 +81,11 @@ fn main() -> AnyhowResult { let opts = CliOpts::parse(); let qr = opts.global_opts.qr; let fetch_root_key = opts.global_opts.fetch_root_key; - let auth = get_auth(opts.global_opts)?; + let auth = if let commands::Command::Generate(_) = &opts.command { + AuthInfo::NoAuth + } else { + get_auth(opts.global_opts)? + }; commands::dispatch(&auth, opts.command, fetch_root_key, qr)?; Ok(()) } diff --git a/tests/commands/generate.sh b/tests/commands/generate.sh new file mode 100755 index 00000000..544cdf5f --- /dev/null +++ b/tests/commands/generate.sh @@ -0,0 +1,4 @@ +p=$(mktemp) +err=$(mktemp) +"$QUILL" generate --phrase "tornado allow zero warm have deer wool finish tiger ski dynamic strong" --seed-file /dev/null --overwrite-seed-file --pem-file "$p" --overwrite-pem-file &> "$err" || { cat "$err" >&2 && exit 1 ; } +"$QUILL" public-ids --pem-file "$p" diff --git a/tests/outputs/generate.txt b/tests/outputs/generate.txt new file mode 100644 index 00000000..e7a0fade --- /dev/null +++ b/tests/outputs/generate.txt @@ -0,0 +1,2 @@ +Principal id: beckf-r6bg7-t6ju6-s7k45-b5jtj-mcm57-zjaie-svgrr-7ekzs-55v75-sae +Account id: ffc463646a2c92dce58d1179d26c64d4ccbaf1079a6edc5628cedc0d4b3b1866