inaccurate error output in snapcraft release if given invalid revision
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
We noticed in one of our release jobs an error stating "No such command 'release'", while `snapcraft release` was certainly working in the previous tasks within the same job:
```
...
19:13:41 Starting Snapcraft 7.5.5
19:13:41 Logging execution to '/home/
19:13:41 Released 'juju' revision 26908 to channels: '2.9/candidate'
19:13:41 + [[ False == \T\r\u\e ]]
19:13:41 + [[ 2.9 == \2\.\9 ]]
19:13:41 + for arch in $build_arches
19:13:41 ++ snapcraft list-revisions juju
19:13:41 ++ awk '{print $1;exit}'
19:13:41 ++ grep 2.9/candidate/
19:13:41 ++ grep ' amd64 '
19:13:46 Starting Snapcraft 7.5.5
19:13:46 Logging execution to '/home/
19:13:46 + store_revision=
19:13:46 ++ cat amd64.store_
19:13:46 cat: amd64.store_
19:13:46 + snapcraft release juju 2.9/candidate/
19:13:49 Starting Snapcraft 7.5.5
19:13:49 Logging execution to '/home/
19:13:49 Usage: snapcraft [OPTIONS] COMMAND [ARGS]...
19:13:49 Try 'snapcraft -h' for help.
19:13:49
19:13:49 Error: No such command 'release'.
```
We noticed that the origin of this issue is that one of our release scripts is passing an invalid store_revision, and we're fixing that, however, along the way we noticed that if `snapcraft release` is ran with an invalid revision, we get the error messsage "No such command `release`", just wanted to raise this.
To recreate, run `snapcraft release juju "" 2.9`