baumer-lab / fertile

creating optimal conditions for reproducibility
GNU General Public License v3.0
52 stars 4 forks source link

problem with shim file? #99

Closed beanumber closed 3 years ago

beanumber commented 3 years ago

When I try to rebuild the package I see this:

==> devtools::document(roclets = c('rd', 'collate', 'namespace'))

Updating fertile documentation
Loading fertile
Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
Calls: suppressPackageStartupMessages ... <Anonymous> -> enable_added_shims -> <Anonymous> -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file '/home/bbaumer/fertile_shims.R': No such file or directory
Execution halted

Exited with status 1.
ambertin commented 3 years ago

This should be fixed in the commits from the current pull request. I had added to the .onAttach function to make sure that it checks that that file exists and doesn't execute anything if it doesn't! Can you try to accept the changes and see if that fixes it?

ambertin commented 3 years ago

Actually I had a typo there last time. Trying to adjust it now.

beanumber commented 3 years ago

Yeah, it still doesn't work.

beanumber commented 3 years ago

@ambertin I'd recommend adding a read_shims() function that checks for the presence of the file and then safely returns. It would be similar to log_touch().

ambertin commented 3 years ago

Addressed in #100