Skip to content

Compare manifest directory before passing manifest path#206

Merged
bbqsrc merged 1 commit into
bbqsrc:mainfrom
StantonMatt:manifest-path-dir-check
Jun 3, 2026
Merged

Compare manifest directory before passing manifest path#206
bbqsrc merged 1 commit into
bbqsrc:mainfrom
StantonMatt:manifest-path-dir-check

Conversation

@StantonMatt

Copy link
Copy Markdown
Contributor

Fixes #202.

The current command builder compares dir.parent() with dir, so a normal working directory always gets --manifest-path appended. This changes the check to compare the current working directory with the selected manifest file's parent directory, which matches the intent from the surrounding code: only pass --manifest-path when the selected package manifest is outside the working directory.

I also split the target/message-format argument appending into a small helper so the same-package and different-package cases are covered directly.

Verification:

  • cargo fmt --all -- --check
  • cargo test cargo::tests --locked
  • cargo test --locked
  • cargo clippy -- -D warnings
  • git diff --check
  • review-fix-loop: no actionable correctness issues found

Signed-off-by: Matthew Stanton <stantonmatthewj@gmail.com>
@bbqsrc bbqsrc merged commit 074473b into bbqsrc:main Jun 3, 2026
18 checks passed
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.

An unexpected path comparison when considering the manifest path

2 participants