← Back to issue list

snapcraft pack --use-lxd ask for the optional directory

View original Launchpad issue

Metadata

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

Current evaluation

Fixed in Snapcraft 8+ by commit 48483c4e3 / PR #4794; pack now accepts --use-lxd with an optional directory.

Resolution: closed resolved

Reason: Commit 48483c4e3, titled "fix: allow packing a directory", implements the corrected pack-directory behavior. The closing maintainer comment confirms the option works in Snapcraft 8 and higher.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The snapcraft pack command is supposed to take optional options and an optional directory. After running `snapcraft prime --use-lxd`, I wanted to run `snapcraft pack --use-lxd` When specifying a flag (--use-lxd in this case), the snapcraft command complains about the missing directory: Usage: snapcraft pack [OPTIONS] DIRECTORY Try 'snapcraft pack -h' for help. Error: No such option: --use-lxd While `snapcraft pack --help` shows: Usage:      snapcraft pack [options] <directory> Summary:     Process parts and create a snap file containing the project payload     with the provided metadata. If a directory is specified, pack its     contents instead. Options:                        ...                        --use-lxd: Use LXD to build I ran my test with a simple core20 snap. snapd: 2.56.2 snapcraft: 7.1.0

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed in Snapcraft 8+ by commit 48483c4e3 / PR #4794; pack now accepts --use-lxd with an optional directory.
stealth/space-bunny-alpha — closed resolved Fixed in Snapcraft 8 and later: pack accepts --use-lxd without requiring a directory. A maintainer confirmed the resolution and closed the report on 2026-08-31.
qwen/qwen3.6-35b-a3b — — The snapcraft pack --use-lxd command incorrectly required a directory argument despite help text indicating it was optional. Maintainers closed the report, confirming the argument parsing bug was resolved in Snapcraft 8 and higher.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 35
Confidence: 90
Support Request: 10
close stale CLI parsing bug where snapcraft pack --use-lxd incorrectly requires a directory argument despite documentation showing it as optional. Unlabeled, no maintainer response, inactive for ~4 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 90
Support Request: 10
close stale snapcraft pack --use-lxd incorrectly requires a directory argument despite being documented as optional. Untriaged and inactive for ~4 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale Reports a CLI parsing error where snapcraft pack --use-lxd incorrectly requires a directory argument despite help text indicating it is optional. Reported for snapcraft 7.1.0 with no maintainer response or updates.

Update history

Date Change
created

Related work

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

    Commit 48483c4e3 is the resolving fix for optional-directory pack behavior.

Related issues

Issue Project State Summary Similarity
#4769 snapcraft 8.2.1: `snapcraft pack` not respecting `<directory>` arg to find `snapcraft.yaml` snapcraft closed Fixed in Snapcraft 8.2.6 by PR #4794 (commit 48483c4e3), restoring project-file lookup for snapcraft pack <directory>; the reporter confirmed the fix.
71%