devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Using system.file in a tryCatch environment

Open john-harrold opened this issue 1 year ago • 1 comments

I am experiencing an issue similar to this one: https://github.com/r-lib/devtools/issues/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.

john-harrold avatar Nov 14 '23 18:11 john-harrold

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

jennybc avatar Nov 16 '23 04:11 jennybc

I've closed this issue due to lack of requested reprex. If you still care about this bug, please open a new issue with a reprex.

hadley avatar Jun 08 '24 13:06 hadley