Skip to content

Commit

Permalink
Merge pull request #1456 from rstudio/no-startup-prompt
Browse files Browse the repository at this point in the history
Disable startup prompt from loading namespace in IDE.
  • Loading branch information
t-kalinowski authored Aug 18, 2023
2 parents ebb5f14 + 515d589 commit 41377f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions R/config.R
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ create_default_virtualenv <- function(package = "reticulate", ...) {
if (virtualenv_exists(envname))
return(virtualenv_python(envname))

if (!isTRUE(getOption("reticulate.python.initializing")))
return(NULL)

permission <- tolower(Sys.getenv("RETICULATE_AUTOCREATE_PACKAGE_VENV", ""))

if (permission %in% c("false", "0", "no"))
Expand Down
3 changes: 2 additions & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
return(main)

# attempt to initialize main
main <<- import_main(convert = TRUE)
if (is_python_initialized())
main <<- import_main(convert = TRUE)

# return value of main
main
Expand Down

0 comments on commit 41377f1

Please sign in to comment.