snapcraft list-keys doesn't show the non-registered key when no key is registered

Bug #1858994 reported by ethan.hsieh
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Here are the reproduction steps:

$ snapcraft create-key test

We're supposed to get following result
$ snapcraft list-keys
    Name SHA3-384 fingerprint
- test <fingerprint> (not registered)

But, list-keys returns no keys
$ snapcraft list-keys
No keys have been registered. See 'snapcraft register-key --help' to register a key.

Need to register the first key.
$ snapcraft register-key test
$ snapcraft list-keys
    Name SHA3-384 fingerprint
* test <fingerprint>

After the first key is registered, list-keys can show the non-registered key.
$ snapcraft create-key serial
$ snapcraft list-keys
    Name SHA3-384 fingerprint
* test <fingerprint>
- serial <fingerprint> (not registered)

---
$ snap list
Name Version Rev Tracking Publisher Notes
snapcraft 3.8 3440 stable canonical* classic

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.