Skip to content

fix(cli): plan and clean refuse a project that is not a folder - #17

Merged
Finjineersdev merged 1 commit into
mainfrom
fix-cli-missing-project
Dec 1, 2026
Merged

Finjineersdev merged 1 commit into
mainfrom
fix-cli-missing-project

Conversation

@Finjineersdev

Copy link
Copy Markdown
Owner

What

plan and clean now stop with <path> is not a folder and exit 1 when a project path is missing or is a file, in text and --json mode ({"error": "...", "schema_version": 1}). Before, they reported the path as an idle project with nothing to clean and exited 0.

The check is in absolute(), which both commands already route every project path through, so there is one guard and no new helper.

The app is not affected: AppModel.clean always passes --only with the folders it picked, and a missing --only folder already fails the command.

Closes #16

How tested

  • New end-to-end test a_project_that_is_not_a_folder_is_an_error: plan and clean on a missing path and on a file. It fails on main and passes with the fix.
  • Engine checks: fmt ok, clippy ok, cargo test --locked 149 passed (148 on main plus the new one), rules-check 12 rule files, 34 artifacts: ok.

`opensweep plan ~/code/my-stie` (a typo) printed "Idle, no edits or
commits found" and "nothing matched", and `clean` printed "Nothing to
clean.", both with exit code 0. Given a file, plan even called it
Pinned because "its .opensweep.toml cannot be read". Now both commands
stop with "<path> is not a folder" and exit 1, in text and JSON.

The check sits in `absolute`, which both commands already route every
project path through. The app is not affected: it always passes --only
with the folders it picked, and a missing --only folder already fails
the command.
@Finjineersdev
Finjineersdev merged commit 774549c into main Dec 1, 2026
6 checks passed
@Finjineersdev
Finjineersdev deleted the fix-cli-missing-project branch December 1, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plan and clean report a mistyped project path as idle with nothing to clean

1 participant