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

isTRUE(travis::uses_github()) always FALSE on R < 3.5 #183

Closed
wants to merge 1 commit into from

Conversation

floriandeboissieu
Copy link

Although the output of travis::uses_github() is of type atomic and logical, when it is TRUE is does not pass test isTRUE because of its attributes, at least on R 3.4.4 with travis 0.2.11.9001. It is said in R base 3.4.4 documentation :
"isTRUE(x) is an abbreviation of identical(TRUE, x), and so is true if and only if x is a length-one logical vector whose only element is TRUE and which has no attributes (not even names)."
thus giving FALSE when there are some attributes, see https://www.r-bloggers.com/working-with-istrue/ for an example.
It is not the case for upper R versions, see 3.5 documentation: https://www.rdocumentation.org/packages/base/versions/3.5.0/topics/Logic

Although the output of travis::uses_github() is of type atomic and logical, when it is TRUE is does not pass test isTRUE because of its attributes, at least on R 3.4.4 with travis 0.2.11.9001. It is said in R base 3.4.4 documentation :
"isTRUE(x) is an abbreviation of identical(TRUE, x), and so is true if and only if x is a length-one logical vector whose only element is TRUE and which has no attributes (not even names)."
thus giving FALSE when there are some attributes, see https://www.r-bloggers.com/working-with-istrue/ for an example.
It is not the case for upper R versions, see 3.5 documentation: https://www.rdocumentation.org/packages/base/versions/3.5.0/topics/Logic
@krlmlr
Copy link
Collaborator

krlmlr commented Oct 1, 2019

Thanks. Let's see if we can handle in backports instead: r-lib/backports#22

@pat-s
Copy link
Member

pat-s commented Oct 14, 2019

Works for me on R 3.4.X. @floriandeboissieu For you as well? Then we can close here.

@krlmlr
Copy link
Collaborator

krlmlr commented Oct 14, 2019

Should we bump the required backports version?

pat-s added a commit that referenced this pull request Oct 14, 2019
@pat-s pat-s closed this in #190 Oct 15, 2019
pat-s added a commit that referenced this pull request Oct 15, 2019
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.

3 participants