← Back to issue list

No helpfull message when command doesn't exist

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2048898
Type
issue
State
open
Author
~gbeuzeboc
Labels
—
Created
Updated
Closed
—

Current evaluation

Snapcraft gave only a generic pack failure when an app command was absent from the staged snap; commit 44930f709 and PR #3321 later added command-not-found validation.

Suggested action: close resolved

Reason: Repository history contains resolving commit 44930f709, titled "meta: add error check for 'command not found' (#3321)", which directly matches the Snapcraft 8.0.1 reproducer. The clear YAML example and exact nonexistent command make the original report readily verifiable.

Evaluated by: mr-cal-bot

Impact: 38 Quick Win: 23 Complexity: 32 Confidence: 96 Actionability: 88

Issue body

If the command specified in the YAML doesn't actually exist, snapcraft provides the following non-helpful message: Command '['snap', 'pack', '--filename', 'liquidctl_test_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1. Failed to execute pack in instance. I used the following example snapcraft.yaml: name: liquidctl summary: empty description: | empty version: test base: core22 confinement: strict parts: liquidctl: plugin: python source: . stage-packages: - python3-usb apps: liquidctl: command: wrongname # Here is the line that makes it fails. plugs: - raw-usb - hardware-observe If the file could be checked, that would help to provide a helpful message for developers. snapcraft --version snapcraft 8.0.1

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 38
Quick Win: 23
Complexity: 32
Confidence: 96
Actionability: 88
close resolved Snapcraft gave only a generic pack failure when an app command was absent from the staged snap; commit 44930f709 and PR #3321 later added command-not-found validation.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 11
Complexity: 58
Confidence: 91
Actionability: 80
needs triage Snapcraft 8.0.1 produces only a generic pack failure when an app command does not exist; this request to validate the command remains untriaged.
qwen3.6-35b-a3b-mtp-q6
Impact: 35
Quick Win: 26
Staleness: 85
Complexity: 25
Confidence: 65
Support Request: 15
needs triage Unhelpful error when snapcraft.yaml command doesn't exist; no maintainer response in 967 days
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 10
Confidence: 85
Support Request: 5
needs triage Reports unhelpful error message when a snapcraft.yaml command does not exist. Provides minimal reproducible example. Unlabeled, no maintainer response, inactive for ~2.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 70
Support Request: 10
needs triage Snapcraft shows a cryptic exit status 1 error when a specified app command doesn't exist. Issue is unlabelled, has no maintainer comments, and has been inactive for ~2.5 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 5
needs triage Unhelpful error message when a snapcraft.yaml command does not exist. The report is unlabelled and has seen no maintainer activity or comments in over two years.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#3321 (confidence 98%)

    PR #3321, implemented by commit 44930f709, added an error check for commands missing from the snap.

Related issues

Issue Project State Summary Similarity
#1791175 check for the existence of a command snapcraft (launchpad) closed Missing app-command validation received a clearer error in merged PR snapcraft#2272, committed as 65ba888da.
75%
#3321 meta: add error check for "command not found" snapcraft merged Merged in snapcraft#3321 via commit 44930f709: missing app commands now raise InvalidAppCommandNotFound; PrimedCommandNotFoundError was removed and unit tests added.
72%