mllg / batchtools

Tools for computation on batch systems
https://mllg.github.io/batchtools/
GNU Lesser General Public License v3.0
169 stars 51 forks source link

ability to suppress warning on failure to source `source` when calling makeRegistry #281

Open myoung3 opened 2 years ago

myoung3 commented 2 years ago

the makeRegistry function contains this line

with_dir(reg$work.dir, loadRegistryDependencies(reg))

which itself will source the source argument of makeRegistries (if specified). This is often a good idea, since it allows testing of the source script in the current environment, but there may be reasons why sourcing that file in the current R session is definitely expected to fail (e.g. if it depends on specific environment variables set in the template file). It would be nice to have a way to suppress this warning message:

 handler("Failed to source file '%s': %s", fn,
                  as.character(ok))