You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
snapcraft promote doesn't work when using the --yes flag. #5945
I've verified that this bug isn't described by any existing issues.
Bug description
The snapcraft promote cmd doesn't work when using the --yes flag.
In the context of a CI I must promote from edge to beta.
When calling the command, it seems the --yes flag prevent the command from working.
$ snapcraft promote ros2-snapd --from-channel edge --to-channel beta --yes
snapcraft promote does not have a stable CLI interface. Use with caution in scripts.
Usage: snapcraft promote [OPTIONS] <snap-name>
Try 'snapcraft promote -h' for help.
Error: 'edge' is not a valid set value for --from-channel when using --yes.
Similar issue happens specifying the latest track:
$ snapcraft promote ros2-snapd --from-channel latest/edge --to-channel latest/beta --yes
snapcraft promote does not have a stable CLI interface. Use with caution in scripts.
Usage: snapcraft promote [OPTIONS] <snap-name>
Try 'snapcraft promote -h' for help.
Error: 'latest/edge' is not a valid set value for --from-channel when using --yes.
Without the --yes cmd, everything works as expected:
$ snapcraft promote ros2-snapd --from-channel jazzy/edge --to-channel jazzy/stable
snapcraft promote does not have a stable CLI interface. Use with caution in scripts.
Build set information for 'jazzy/edge'
Arch Revision Version
amd64 46 0+git.8c248c6
arm64 47 0+git.8c248c6
Do you want to promote the current set to the 'jazzy/stable' channel? [y/N]: y
Promotion from jazzy/edge to jazzy/stable complete
This code was added in #3185, which doesn't give a clear motivation for excluding this behavior when promoting from edge. Since the store gives the same confirmation requirements (just a single "are you sure?") for this operation, I am inclined to say Snapcraft should have the same behavior. That is, this behavior of requiring manual confirmation even with --yes only for edge should be removed.
I'm curious if anyone has any opposing thoughts, though.
Thanks, @Hook25. There seems to be agreement in the team that we want to fix this, but we haven't yet decided if that's through something like --allow-unsafe-promotion or by simply letting --yes work in this case.
Activity
bepri commentedon Jan 7, 2026
As some additional context, this is the offending if statement.
This code was added in #3185, which doesn't give a clear motivation for excluding this behavior when promoting from
edge. Since the store gives the same confirmation requirements (just a single "are you sure?") for this operation, I am inclined to say Snapcraft should have the same behavior. That is, this behavior of requiring manual confirmation even with--yesonly foredgeshould be removed.I'm curious if anyone has any opposing thoughts, though.
MirkoFerrati commentedon Jan 8, 2026
@bepri see this also #4312
bepri commentedon Jan 8, 2026
Thanks for this extra context @MirkoFerrati - I didn't find this issue!
syncronize-issues-to-jira commentedon Jan 8, 2026
Thank you for reporting your feedback to us!
The internal ticket has been created: https://warthogs.atlassian.net/browse/SNAPCRAFT-1268.
Hook25 commentedon Jan 12, 2026
Given that the other issue was closed, bumping that we are still using this bodge to work around the issue
bepri commentedon Jan 12, 2026
Thanks, @Hook25. There seems to be agreement in the team that we want to fix this, but we haven't yet decided if that's through something like
--allow-unsafe-promotionor by simply letting--yeswork in this case.mr-cal commentedon Jun 15, 2026
This has been fixed in Snapcraft 9.0.
Anyone using workarounds in a Github workflow like this:
can use the
--yesflag instead: