checkhelper icon indicating copy to clipboard operation
checkhelper copied to clipboard

interactive() in examples

Open JosiahParry opened this issue 1 year ago • 0 comments

Following the instructions at https://github.com/ThinkR-open/prepare-for-cran I am trying to use checkhelper::check_clean_userspace() however, I have examples in my code that are wrapped with if (interactive()). I use the RStudio shortcut cmd + shift + e to run my checks which is non-interactive. But using the terminal with this, the examples are executed (same with devtools::run_examples()). Is there a way to ensure that interactive() is false when using checkhelper?

I suppose I could try Rscript -e "checkhelper::check_clean_userspace()" but it feels a little awkward

JosiahParry avatar Jan 02 '24 21:01 JosiahParry