Skip to content

Commit 85387df

Browse files
committed
QUARTO_PRINT_STACK environment variable to print stack along with error messages
1 parent e9ffd7e commit 85387df

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

news/changelog-1.1.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
## References
1717

18-
- Write additional citation metadata for compatibility with Highwire/Zotero (#1609)
18+
- Write additional citation metadata for compatibility with Highwire/Zotero (#1609)
1919
- Support for `nocite` within \_project.yml for book projects (#1660)
2020

2121
## Crossrefs
@@ -63,3 +63,4 @@
6363
- Correctly support Giscus `category-id` property
6464
- Correctly support `output-file` names that contain `.` characters (like `file.name.html`)
6565
- Avoid file permission errors in additional cases (thanks @jmbuhr)
66+
- `QUARTO_PRINT_STACK` environment variable to print stack along with error messages

src/core/log.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ export function logError(e: unknown) {
281281
let message = err.printName ? `${err.name}: ${err.message}` : err.message;
282282

283283
// print the stack if requested and if this is a debug build
284-
const isDebug = getenv("QUARTO_DEBUG", "false") === "true";
284+
const isDebug = getenv("QUARTO_DEBUG", "false") === "true" ||
285+
getenv("QUARTO_PRINT_STACK", "false") === "true";
285286
if (isDebug && err.stack && err.printStack) {
286287
message = message + "\n\n" + err.stack;
287288
}

0 commit comments

Comments
 (0)