r-lib / rprojroot

Finding files in project subdirectories
https://rprojroot.r-lib.org/
Other
149 stars 23 forks source link

feat: Check all subdirs in `find_root()` instead of only the first existing one #100

Open salim-b opened 9 months ago

salim-b commented 9 months ago

Fixes https://github.com/r-lib/rprojroot/issues/84.

Before, the second test in test_that("all criterion subdirs are checked", ... failed since find_root() didn't enter subdir b (which fullfills the criterion) because subdir a (which doesn't fullfill the criterion) also exists.

aviator-app[bot] commented 9 months ago

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes. Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This pull request is currently open (not queued).

How to merge

To merge this PR, comment /aviator merge or add the mergequeue label.


See the real-time status of this PR on the Aviator webapp.

Use the Aviator Chrome Extension to see the status of your PR within GitHub.
krlmlr commented 9 months ago

Thanks, I'm confused. I ran the tests with c780689621ded9b5c08e85efd2d84485f296b2b1 applied to the mainline, they work for me. What am I missing?

After #101, if needed, please use git rebase -X theirs origin/main to sync this branch with the mainline.

salim-b commented 9 months ago

Thanks, I'm confused. I ran the tests with c780689 applied to the mainline, they work for me. What am I missing?

Thanks for having a look! I messed up the new test by omitting the empty dirs in the commit. I now corrected the commit with the test, so it properly fails when cherry-picked onto main (just confirmed):

git cherry-pick 15d80b0dc92c75a79d34447c39f799c51452ebe6

Sorry for the inconvenience.