From fc50988f471d93641b543e70c318d4f608540d58 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Wed, 8 Nov 2023 16:10:31 -0500 Subject: [PATCH] Debug --- R/R/compile.R | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/R/R/compile.R b/R/R/compile.R index 59207195..28127115 100644 --- a/R/R/compile.R +++ b/R/R/compile.R @@ -101,13 +101,14 @@ compile_model <- function(stan_file, stanc_args = NULL, make_args = NULL) { windows_path_setup <- function() { if (.Platform$OS.type == "windows") { - tryCatch({ - out <- suppressWarnings(system2("where.exe", "tbb.dll", stdout = NULL, - stderr = NULL)) - }, error = function(e) { + print("Verifying TBB") + suppressWarnings(out <- system2("where.exe", "tbb.dll", stdout = NULL, stderr = NULL)) + if (out != 0) { + print("Adding TBB to PATH") tbb_path <- file.path(get_bridgestan_path(), "stan", "lib", "stan_math", "lib", "tbb") Sys.setenv(PATH = paste(tbb_path, Sys.getenv("PATH"), sep = ";")) - }) + } + print(Sys.getenv("PATH")) } }