fix(cli): restrict --project-dir to init and pack commands (#1565)
Metadata
Current evaluation
Merged to main as a cherry-pick, restricting the --project-dir CLI flag to init and pack commands. Approved by two reviewers, the update removes 579 lines across eight files.
Suggested action: —
No scores available.
Issue body
(CRAFT-2434)
This is a cherry-pick of #1565 for the main branch.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged to main as a cherry-pick, restricting the --project-dir CLI flag to init and pack commands. Approved by two reviewers, the update removes 579 lines across eight files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a cherry-pick of #1565 to main, restricting the CLI --project-dir flag to init and pack commands. Resolved as a bug fix. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a cherry-pick of PR #1565 that restricts the --project-dir CLI flag to the init and pack commands. Applied directly to the main branch by maintainer lengau. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1583 fix(cli): restrict --project-dir to init and pack commands (#1565) | charmcraft | closed | Merged #1565 to restrict the --project-dir CLI flag to init and pack commands. The change modified 9 files, removing 599 lines and adding 26, limiting flag scope to relevant commands and resolving the CLI configuration issue. | |
| #1565 fix(cli): --project-dir should only be available for init and pack commands | charmcraft | merged | Merged a fix restricting the --project-dir CLI flag to only init and pack commands. The change removed the global flag, cleaned up tests, and reduced code by nearly 600 lines. Approved by reviewers and passed all CI checks. | |
| #253 fix(application): Only allow --project-dir for init and pack | craft-application | closed | Restricting --project-dir to init and pack commands was closed without merging. Reviewers requested changes with two unresolved comments, leading to abandonment. | |
| #1565 cli: add the pack command | snapcraft | merged | Merged the pack CLI command, replacing the previous assemble implementation. Approved by one reviewer, passed CI checks, and updated seven files with 164 additions and 16 deletions. | |
| #229 fix: make project directory loading less strict. | craft-application | merged | Merged a change to relax project directory loading validation. Commands like init can now accept non-existent directories, only failing if an existing one is incompatible. Approved by three reviewers, passed CI, and modified two files. |