From b23878ae76139230da0042204f293d148f53f25d Mon Sep 17 00:00:00 2001 From: Jonathan Keane Date: Thu, 20 Jun 2024 18:47:08 -0500 Subject: [PATCH] Oops, can't use NULL in unset --- r/tools/nixlibs.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index 51f8834599a2a..fc79e06328005 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -827,7 +827,11 @@ set_thirdparty_urls <- function(env_var_list) { # env_var_list is_feature_requested <- function(env_varname, env_var_list, default = env_is("LIBARROW_MINIMAL", "false")) { # look in the environment first, but then use the env_var_list if nothing is found - env_value <- tolower(Sys.getenv(env_varname, env_var_list[[env_varname]])) + env_var_list_value <- env_var_list[[env_varname]] + if (is.null(env_var_list_value)) { + env_var_list_value <- "" + } + env_value <- tolower(Sys.getenv(env_varname, env_var_list_value)) if (identical(env_value, "off")) { # If e.g. ARROW_MIMALLOC=OFF explicitly, override default requested <- FALSE