← Back to issue list

fix(cli): --project-dir should only be available for init and pack commands

View original Github issue

Metadata

Project
charmcraft
Number
#1565
Type
pull request
State
merged
Author
mattculler
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

No scores available.

Issue body

Attempt the second. (CRAFT-2434)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen3.6-35b-a3b-mtp-q6 Merged. Restricts the --project-dir CLI flag to init and pack commands only. Includes test cleanup for the legacy entry point and addresses LXD disk path validation errors during packaging. Aligns with CRAFT-2434.
qwen3.6-35b-a3b-mtp-q6 Merged. Restricts the --project-dir CLI flag to init and pack commands. After addressing linting feedback and resolving an LXD path bug, changes were approved and merged, removing the flag's global availability.

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.
90%
#1592 fix(cli): restrict --project-dir to init and pack commands (#1565) charmcraft merged 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.
90%
#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.
74%
#2427 fix(lifecycle): fix --project-dir and --output charmcraft merged Merged a fix for --project-dir and --output parameters in pack. The change moves the final artifact to the correct location based on these parameters. Approved by two reviewers with all CI checks passing.
72%
#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.
72%