mirror of
https://github.com/github/spec-kit.git
synced 2026-08-15 14:02:04 +02:00
fix(presets): tolerate non-UTF-8 legacy commands (#3896)
Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -5297,7 +5297,7 @@ class PresetResolver:
|
||||
fm_strategy = fm_data.get("strategy")
|
||||
if isinstance(fm_strategy, str) and fm_strategy.lower() in VALID_PRESET_STRATEGIES:
|
||||
strategy = fm_strategy.lower()
|
||||
except (yaml.YAMLError, OSError):
|
||||
except (UnicodeDecodeError, yaml.YAMLError, OSError):
|
||||
# Best-effort legacy frontmatter parsing: keep default
|
||||
# strategy ("replace") when content is unreadable/invalid.
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user