When I use the opt_help() function in my script, and then run the script from the command line with the help option:
Rscript my_r_script.R --help
I get the following error after the help message:
Error in quit(save = FALSE):
one of "yes", "no", "ask" or "default" expected.
Calls: <Anonymous> -> quit
Execution halted
Looking at the code for the opt_help() function, I think the problem is line 65:
if( ! interactive() ) quit( save = FALSE )
Looking at the R docs for the quit function, the save argument is expecting one of "no", "yes", "ask", or "default", rather than a boolean value. So the following change should fix this problem:
if( ! interactive() ) quit( save = "no")
I ran into this issue on Windows 10 with R v3.6.0 and optigrab v0.9.2.1.