Repository navigation
fix(cli): accept relative project paths in plan and clean - #8
Merged
Merged
Conversation
`opensweep plan .` or `opensweep clean ../site` refused every folder with "path is not absolute": the project path reached the guard as typed, and the guard (rightly) refuses relative candidates. `scan` and `pin` already resolve their paths. plan and clean now make a relative project path absolute first; absolute paths are passed on unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
opensweep plan .andopensweep clean ../siterefused every folder:The project path went to the guard exactly as typed, and the guard refuses relative candidates (that refusal is right and is not changed).
scanandpinalready resolve their paths;planandcleandid not.Now
planandcleanmake a relative project path absolute before anything else. Absolute paths are passed on unchanged, so the app (which always passes absolute paths) and the JSON output for absolute paths are not affected. The guard, the rules and the quarantine are not touched.How tested
a_project_given_relative_to_the_working_folder_is_checkedrunsplan .andclean ../sitefrom inside the project. It fails onmain("path is not absolute") and passes with the fix.HOMEpointed at a temp folder:plan .now showsallow .next ... Safe.cargo fmt --all --check: okcargo clippy --all-targets --locked -- -D warnings: okcargo test --locked: 146 passed, 0 failed (145 on main, plus the new test)cargo run -q -p opensweep-cli -- rules-check rules: 11 rule files, 31 artifacts: okcd CleanCore && swift test: 21 tests, 0 failures;scripts/check-swift-never-deletes.sh: ok🤖 Generated with Claude Code