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

Is branch checking broken? #2202

Closed
fabianegli opened this issue Mar 16, 2023 · 2 comments
Closed

Is branch checking broken? #2202

fabianegli opened this issue Mar 16, 2023 · 2 comments

Comments

@fabianegli
Copy link
Contributor

fabianegli commented Mar 16, 2023

Possibly not, but how does

[[ $GITHUB_HEAD_REF = "dev" ]]

make any sense? Shouldn't it be

[[ $GITHUB_HEAD_REF == "dev" ]]?

After all, it's a comparison - and single = are normally assignments. But there might be some hidden Bash sorcery at work that I don't understand...

See:

{ [[ ${{github.event.pull_request.head.repo.full_name}} == nf-core/tools ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]

Introduced in f499c3f

@fabianegli
Copy link
Contributor Author

OK, so there is the possibility to use either == or = for comparisons within [[ in Bash. See: https://www.gnu.org/software/bash/manual/html_node/Bash-Conditional-Expressions.html

I still think it is better to harmonize the synthax.

@fabianegli
Copy link
Contributor Author

Closed by #2203

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

No branches or pull requests

1 participant