diff --git a/R/run.R b/R/run.R index 556477e4..7d272993 100644 --- a/R/run.R +++ b/R/run.R @@ -560,8 +560,8 @@ CmdStanRun$set("private", name = "run_variational_", value = .run_other) if (file.exists(stdout_file)) { cat(readLines(stdout_file), sep = "\n") } - if (file.exists(stdout_file)) { - cat(readLines(stdout_file), sep = "\n") + if (file.exists(stderr_file)) { + cat(readLines(stderr_file), sep = "\n") } stop( "Diagnose failed with the status code ", ret$status, "!\n",