dsh-zju-lecture-note 2.2.7 → 2.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2533,6 +2533,8 @@ def _prelude_text() -> str:
2533
2533
 
2534
2534
 
2535
2535
  def _run_typst(typst: str, args: Sequence[str], cwd: str, timeout: int) -> Tuple[int, str]:
2536
+ from .deps import typst_env
2537
+
2536
2538
  try:
2537
2539
  completed = subprocess.run(
2538
2540
  [typst, *args],
@@ -2541,6 +2543,8 @@ def _run_typst(typst: str, args: Sequence[str], cwd: str, timeout: int) -> Tuple
2541
2543
  stderr=subprocess.STDOUT,
2542
2544
  timeout=timeout,
2543
2545
  check=False,
2546
+ # Never hand the classroom cookie to the compiler subprocess.
2547
+ env=typst_env(),
2544
2548
  )
2545
2549
  except subprocess.TimeoutExpired:
2546
2550
  return 124, f"typst 编译超时({timeout} 秒)。"