diff --git a/R/installers.R b/R/installers.R index 39f0cf5..5fb2f59 100644 --- a/R/installers.R +++ b/R/installers.R @@ -13,6 +13,22 @@ install_strip_level = function(arch = system_arch()) { ) } +recipe_binary_install_strip_level = function(arch = system_arch()) { + if (is_r_version("4.3")) { + switch( + arch, + "arm64" = 3, + "aarch64" = 3, + "x86_64" = 3, + stop("`arch` type not recognized. Please make sure you are on either an `arm64` or `x86_64` system.") + ) + } else if (is_r_version("4.0") | is_r_version("4.1") | is_r_version("4.2")) { + install_strip_level() + } else { + stop("We do not yet support recipe binary installation for the current version of R.") + } +} + install_location = function(arch = system_arch()) { switch( diff --git a/R/recipes.R b/R/recipes.R index a0f5ad4..faf80d5 100644 --- a/R/recipes.R +++ b/R/recipes.R @@ -188,7 +188,7 @@ recipes_binary_install = function( # Determine the correct installation path based on arch type supplied_arch = strsplit(os.arch, "/")[[1]][2] installation_directory = recipe_binary_install_location(supplied_arch) - installation_strip_level = install_strip_level(supplied_arch) + installation_strip_level = recipe_binary_install_strip_level(supplied_arch) # Ensure the installation location is valid. create_install_location(arch = supplied_arch, password = entered_recipes_password)