← Back to issue list

fix: make project directory loading less strict.

View original Github issue

Metadata

Project
craft-application
Number
#229
Type
pull request
State
merged
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #229 in commit 341e378d: project-directory loading now permits missing directories and rejects only incompatible existing paths, supporting commands such as init.

Resolution: closed resolved

Reason: PR #229 was merged as commit 341e378d. It relaxed project-directory validation to allow a nonexistent target while still failing when an existing path is not a compatible directory.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Some commands (e.g. `init`) might want to provide a project directory but not require it to exist. In these cases, we should only fail if what exists already is incompatible. - [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `tox`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #229 in commit 341e378d: project-directory loading now permits missing directories and rejects only incompatible existing paths, supporting commands such as init.
stealth/space-bunny-alpha — closed resolved Merged in craft-application#229 (commit 341e378d), allowing nonexistent project directories while still rejecting incompatible existing paths.
stealth/space-bunny-alpha — closed resolved Merged #229 in commit 341e378d: project-directory loading now accepts a missing directory and rejects only incompatible existing content.
qwen/qwen3.6-35b-a3b — — 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.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#508 Support --project-dir pointing to a missing directory (CRAFT-474). charmcraft merged Merged #508 (dbad275a, implementation 15d530ae) to tolerate a missing --project-dir; a later init regression was fixed by merged #543 (d21282d9).
72%
#1565 fix(cli): --project-dir should only be available for init and pack commands charmcraft merged Merged #1565 restricted --project-dir to init and pack; the fix was cherry-picked into main by #1592 as 06c485fc.
71%
#445 Move common directories to ProjectOptions snapcraft merged Merged PR #445, moving common directories into ProjectOptions; the refactor landed as commit 8f601c0ca.
71%
#1592 fix(cli): restrict --project-dir to init and pack commands (#1565) charmcraft merged Merged into main as 06c485fc, cherry-picking #1565 to restrict --project-dir to init and pack commands.
70%