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

Using system.file in a tryCatch environment #2548

Open
john-harrold opened this issue Nov 14, 2023 · 1 comment
Open

Using system.file in a tryCatch environment #2548

john-harrold opened this issue Nov 14, 2023 · 1 comment

Comments

@john-harrold
Copy link

I am experiencing an issue similar to this one:
#179

I am developing a package using devetools::load_all() to test things. I am using eval within a tryCatch environment. Part of the code I am evaluating is calling system file for the package I'm developing. If I try to evaluate the code in the tryCatch environment , the system.file command returns "". If I just eval the code eval(parse(text='system.file(package="bob", "path", "to", "bob")')) it will return the file path.

@jennybc
Copy link
Member

jennybc commented Nov 16, 2023

Can you link to your package and make this conversation much more specific, i.e. I could experience the problem myself?

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

2 participants