From d85374483006b7966363c548e87be77037aa05e7 Mon Sep 17 00:00:00 2001 From: Philipp Baumann Date: Fri, 6 Oct 2023 05:17:35 +0200 Subject: [PATCH] fix missing `pkgs.mkShell` when `shell_hook = NULL` --- R/find_rev.R | 4 ++-- dev/build_envs.Rmd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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,