From 0269fe2b38c6eff750b4d9b0702089c74e0e0249 Mon Sep 17 00:00:00 2001 From: Rick Saporta on TFD_MBP_2019 Date: Sat, 6 Jun 2020 00:56:40 -0400 Subject: [PATCH] check for `stanloc` before beginning to compile --- R/stanMisc.r | 1 + 1 file changed, 1 insertion(+) diff --git a/R/stanMisc.r b/R/stanMisc.r index 6b5a80c..ee26ce2 100644 --- a/R/stanMisc.r +++ b/R/stanMisc.r @@ -179,6 +179,7 @@ stanCompile <- options(auto_write = FALSE) stanloc <- .Options$stancompiled if(! length(stanloc)) stop('options(stancompiled=) not defined') + if(! file.exists(stanloc)) stop('The directory defined in options(stancompiled=), \"', stanloc, '\" does not exist. Hint: see ?dir.create') cat('Compiling', length(mods), 'programs to', stanloc, '\n') for(m in mods) {