Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_main_branch() always running get_main_branch_config() even when it shouldn't #768

Open
D3SL opened this issue Apr 28, 2024 · 3 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@D3SL
Copy link
Contributor

D3SL commented Apr 28, 2024

Related to #767 , and how I found it. For some reason get_main_branch() is always running get_main_branch_config() even when it shouldn't because the tests on line 83 (remote %in% remote_list$name) and 85 (length(remote_main)) succeed.

There's 2 possibilities I can think of. The first is there's a build time issue leading to the tests failing in the function but working when the same lines of code are run interactively, or for some other reason the function isn't ending at the return() call and because the implied "else" clause isn't in an explicit else{} section get_main_branch_config() keeps getting run.

Parallel to all that length() is as in #767 not a good test for dataframes.

@maelle maelle added the bug an unexpected problem or unintended behavior label May 17, 2024
@maelle
Copy link
Member

maelle commented Jun 25, 2024

Do you want to tackle this next? 😇

@maelle
Copy link
Member

maelle commented Jun 25, 2024

why do you think/see the function is running? because of the bug you've now fixed?

@maelle
Copy link
Member

maelle commented Jun 25, 2024

what I find more problematic is that if the "origin" branch doesn't exist, get_main_branch_remote() will error. (I ran get_main_branch_remote("bla") to try). so that should probably be made more robust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Development

No branches or pull requests

2 participants