Skip to content

Commit cfc2a3e

Browse files
fix: quarto error logging (#658)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent eddbf8c commit cfc2a3e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

doc/changelog.d/658.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
quarto error logging

src/ansys_sphinx_theme/cheatsheet.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ def run_quarto_command(command: List[str], cwd: str) -> None:
108108
logger.info(result.stdout)
109109

110110
if result.stderr:
111-
logger.error(result.stderr)
111+
if "error" or "failed" in result.stderr.lower():
112+
logger.error(result.stderr)
113+
else:
114+
# HACK: Quarto writes both stdout and stderr to stderr
115+
# so we need to log it as info if it's not an error
116+
logger.info(result.stderr)
112117

113118
except subprocess.CalledProcessError as e:
114119
raise RuntimeError(f"Failed to run the command: {e}")

0 commit comments

Comments
 (0)