diff --git a/R/install.R b/R/install.R index bd6f4319a..f376e3762 100644 --- a/R/install.R +++ b/R/install.R @@ -204,7 +204,8 @@ install_cmdstan <- function(dir = NULL, untar_rc <- utils::untar( dest_file, exdir = dir_cmdstan, - extras = "--strip-components 1" + extras = "--strip-components 1", + tar = if (os_is_windows()) "tar.exe" else Sys.getenv("TAR") ) if (untar_rc != 0) { stop("Problem extracting tarball. Exited with return code: ", untar_rc, call. = FALSE)