near / near-cli

General purpose command line tools for interacting with NEAR Protocol
https://docs.near.org
MIT License
193 stars 93 forks source link

near delete-key lists an `--access-key` option which it does not accept unless positional #935

Open nagisa opened 2 years ago

nagisa commented 2 years ago

Describe the bug

 #near delete-key $ACCOUNT --access-key "ed25519:banana"
 near delete-key <account-id> <access-key>

delete access key

Options:
 --help Show help <span class="error">[boolean]</span>
 --version Show version number <span class="error">[boolean]</span>
 --nodeUrl, --node_url NEAR node URL <span class="error">[string]</span> <span class="error">[default: "https://rpc.testnet.near.org"]</span>
 --networkId, --network_id NEAR network ID, allows using different keys based on network <span class="error">[string]</span> <span class="error">[default: "testnet"]</span>
 --helperUrl NEAR contract helper URL <span class="error">[string]</span>
 --keyPath Path to master account key <span class="error">[string]</span>
 --accountId, --account_id Unique identifier for the account <span class="error">[string]</span>
 --useLedgerKey Use Ledger for signing with given HD key path <span class="error">[string]</span> <span class="error">[default: "44'/397'/0'/0'/1'"]</span>
 --seedPhrase Seed phrase mnemonic <span class="error">[string]</span>
 --seedPath HD path derivation <span class="error">[string]</span> <span class="error">[default: "m/44'/397'/0'"]</span>
 --walletUrl Website for NEAR Wallet <span class="error">[string]</span>
 --contractName Account name of contract <span class="error">[string]</span>
 --masterAccount Master account used when creating new accounts <span class="error">[string]</span>
 --helperAccount Expected top-level account for a network <span class="error">[string]</span>
 -v, --verbose Prints out verbose output <span class="error">[boolean]</span> <span class="error">[default: false]</span>
 -f, --force Forcefully execute the desired action even if it is unsafe to do so <span class="error">[boolean]</span> <span class="error">[default: false]</span>
 --access-key Public key to delete (base58 encoded) <span class="error">[string]</span> <span class="error">[required]</span>

Not enough non-option arguments: got 1, need at least 2

Note how it still insists on receiving 2 non-option parameters, even thuogh the access-key is listed as a required flag.

To Reproduce

See above.

Expected behavior

Don't list unusable CLI flags.

Screenshots N/A

Desktop (please complete the following information):