diff --git a/R/find_rev.R b/R/find_rev.R index 17357291..adc31fc7 100644 --- a/R/find_rev.R +++ b/R/find_rev.R @@ -517,9 +517,9 @@ flag_rpkgs flag_rstudio <- if (ide == "rstudio") "rstudio_pkgs" else "" - shell_hook <- if (!is.null(shell_hook)) { + shell_hook <- if (!is.null(shell_hook) && nzchar(shell_hook)) { paste0('shellHook = "', shell_hook, '";') - } + } else {''} # Generate the shell generate_shell <- function(flag_git_archive, diff --git a/dev/build_envs.Rmd b/dev/build_envs.Rmd index 75565bce..35d0bccf 100644 --- a/dev/build_envs.Rmd +++ b/dev/build_envs.Rmd @@ -601,9 +601,9 @@ flag_rpkgs flag_rstudio <- if (ide == "rstudio") "rstudio_pkgs" else "" - shell_hook <- if (!is.null(shell_hook)) { + shell_hook <- if (!is.null(shell_hook) && nzchar(shell_hook)) { paste0('shellHook = "', shell_hook, '";') - } + } else {''} # Generate the shell generate_shell <- function(flag_git_archive,