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

"bad error message" redux #65

Open
DarwinAwardWinner opened this issue Jun 11, 2020 · 0 comments
Open

"bad error message" redux #65

DarwinAwardWinner opened this issue Jun 11, 2020 · 0 comments

Comments

@DarwinAwardWinner
Copy link

I have previously reported an issue about getting "bad error message", which was fixed, but now I have run into another instance of it. Here is some code that produces the error for me:

library(assertthat)
library(fs)
# Works fine (assertion fails normally)
assert_that(all(file_exists(c("/this/path/does/not/exist/fileA", "/this/p", "C"))))
# One char longer: "bad error message"
assert_that(all(file_exists(c("/this/path/does/not/exist/fileA", "/this/pa", "C"))))

## Returns 1 element
see_if(all(file_exists(c("/this/path/does/not/exist/fileA", "/this/p", "C"))))
## One char longer: Returns 2 elements
see_if(all(file_exists(c("/this/path/does/not/exist/fileA", "/this/pa", "C"))))

As shown by the see_if calls at the bottom, the problem coincides with the vector length that causes see_if to return a vector of length greater than 1.

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