Environment variables are visible in the RStudio IDE R session used for push-button deployment. Not all R options are mirrored into that session.
These settings indicate that packrat should be used, even in the presence of an renv.lock. When using packrat, the renv directory and renv.lock file are removed from the bundle directory, as would happen prior to rsconnect 1.0.0.
Fixes #935
Fixes #936
# Unset any existing options before testing.
Sys.unset("RSCONNECT_PACKRAT")
options(reconnect.packrat = NULL)
# Use packrat; applies to push-button and console deploys.
# Ignores renv.lock if it exists.
Sys.setenv(RSCONNECT_PACKRAT = "TRUE")
# Use packrat; applies to console deploys only. Discouraged.
# Ignores renv.lock if it exists.
options(rsconnect.packrat = TRUE)
# If both are set, the environment variable setting wins.
# This example will use renv because RSCONNECT_PACKRAT is set.
Sys.setenv(RSCONNECT_PACKRAT = "FALSE")
options(rsconnect.packrat = TRUE)
Environment variables are visible in the RStudio IDE R session used for push-button deployment. Not all R options are mirrored into that session.
These settings indicate that packrat should be used, even in the presence of an renv.lock. When using packrat, the renv directory and renv.lock file are removed from the bundle directory, as would happen prior to rsconnect 1.0.0.
Fixes #935 Fixes #936