-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
option setters clear other settings #655
Comments
This is because the single-property setter is effectively a call to packrat::set_opts(ignored.packages = c("emo"), persist = FALSE)
packrat::set_opts(snapshot.recommended.packages = TRUE, persist = FALSE)
packrat::get_opts(c("ignored.packages"))
# => NULL |
A workaround is to read all the packrat options, adjust the single target, then set all options together. packrat::set_opts(ignored.packages = c("emo"), persist = FALSE)
o <- packrat::get_opts()
o[["snapshot.recommended.packages"]] <- TRUE
do.call(packrat::set_opts, o)
packrat::get_opts(c("ignored.packages", "snapshot.recommended.packages"))
# => [1] "emo" "TRUE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the option setter clears other configured options.
This is using the setter defined by:
packrat/R/options.R
Lines 173 to 179 in c648ce2
the setter is connected to the
packrat::opts
here:packrat/R/options.R
Lines 221 to 223 in c648ce2
The text was updated successfully, but these errors were encountered: