← Back to issue list

snapcraft promote doesn't work when using the `--yes` flag.

View original Github issue

Metadata

Project
snapcraft
Number
#5945
Type
issue
State
closed
Author
Guillaumebeuzeboc
Labels
Status: Triaged
Created
Updated
Closed

Current evaluation

Fixed by merged PR #5984 (commit 1b669ec44), which removed the edge-channel restriction so `snapcraft promote --from-channel edge --to-channel beta --yes` now works. Shipped in Snapcraft 9.0.

Resolution: closed resolved

Reason: PR #5984 "feat!: allow promoting from edge channels with --yes" was merged as commit 1b669ec44, dropping the if-statement in snapcraft_legacy/cli/store.py that rejected edge channels with --yes. A maintainer comment confirms the fix landed in Snapcraft 9.0 and that the SNAPCRAFT_HAS_TTY/`yes |` workaround is no longer needed.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Check existing issues - [x] 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 ``` ### Environment snapcraft 8.13.2

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #5984 (commit 1b669ec44), which removed the edge-channel restriction so `snapcraft promote --from-channel edge --to-channel beta --yes` now works. Shipped in Snapcraft 9.0.
stealth/space-bunny-alpha — closed resolved Snapcraft 9.0 fixed promote --yes from edge channels. PR #5984 was merged as commit 1b669ec44, removing the edge-only confirmation restriction.
stealth/space-bunny-alpha — closed resolved Fixed in Snapcraft 9.0 by merged PR #5984 (commit 1b669ec44), allowing promote --yes from edge channels for noninteractive CI.
qwen/qwen3.6-35b-a3b — — Fixed in Snapcraft 9.0. The --yes flag now correctly bypasses the manual confirmation prompt when promoting snaps from edge channels, resolving the validation error that previously blocked automated CI workflows.
qwen/qwen3.6-35b-a3b — — Fixed in Snapcraft 9.0. The --yes flag now correctly enables automated promotions from edge channels, removing the previous validation error and allowing seamless CI workflows without manual confirmation.
qwen/qwen3.6-35b-a3b — — Fixed in Snapcraft 9.0. The snapcraft promote command now correctly accepts the --yes flag for edge channel promotions, resolving the previous validation error and eliminating the need for TTY workarounds.
qwen3.6-35b-a3b-mtp-q6 — — Fixed in Snapcraft 9.0. The --yes flag now correctly bypasses interactive confirmation when promoting from edge channels. Validation logic previously blocking --yes for edge promotions was removed, allowing direct flag usage without TTY workarounds.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#5984 (confidence 97%)

    Merged PR removing the edge-channel guard for --yes; also closed #5958, #4439, #4312.

  • Duplicate Of: canonical/snapcraft#4439 (confidence 78%)

    Same promotion-from-edge confirmation problem; workaround using SNAPCRAFT_HAS_TTY discussed there.

  • Duplicate Of: canonical/snapcraft#4312 (confidence 65%)

    Earlier related report cited by a maintainer as additional context.

Related issues

Issue Project State Summary Similarity
#5984 feat!: allow promoting from edge channels with --yes snapcraft merged Merged #5984 as commit 1b669ec44, allowing promote --yes from edge channels in Snapcraft 9 and resolving #5958, #5945, #4439, and #4312.
84%
#4439 failed when promote snap using option: --yes snapcraft closed Closed as a duplicate of #5945; merged PR #5984 (1b669ec44) fixed `promote --yes` for edge-to-beta promotion in Snapcraft 9.0.
83%
#4312 failed when promote snap using option: --yes snapcraft closed Closed as a duplicate of #5945; the replacement was fixed by merged PR #5984 (commit 1b669ec44), enabling promote --yes from edge in Snapcraft 9.0.
81%
#5958 Remove restriction for promoting edge releases with `--yes` snapcraft closed Snapcraft 9 removed the restriction on promoting edge releases with --yes via merged PR #5984 (commit 1b669ec44).
79%
#1855688 snapcraft promote fails with <track>/edge snapcraft (launchpad) closed CLI promotion from edge was enabled by merged PR #3185 (commit 131c99fd9), removing the restriction that forced users to use the web UI.
75%
#1979808 snapcraft promote in snapcraft 7 is unusable snapcraft (launchpad) closed Fixed in Snapcraft 7.0.8 by restoring the promote command's required snap-name argument in PR #3807 (commit 727f39204).
72%
#3185 cli: allow promoting from edge without --yes snapcraft merged Merged PR #3185, allowing CLI promotions from the edge channel without requiring --yes; merged as commit 131c99fd9.
71%
#6294 Snapcraft 9 fails silently with pre-9 CI promotion syntax snapcraft closed Cancelled `snapcraft promote` prompts now exit non-zero and warn when SNAPCRAFT_HAS_TTY is set without --yes, via PR #6304 (68c28110f), released in Snapcraft 9.0.1.
71%