mirror of
https://github.com/github/spec-kit.git
synced 2026-07-04 04:45:43 +08:00
fix(integrations): strip UTF-8 BOM when reading agent context files (#2283)
* fix(integrations): strip UTF-8 BOM when reading agent context files * test(integrations): add BOM regression tests for context file read/write * test(workflows): mock shutil.which in tests that assume CLI is absent * test(integrations): remove unused manifest variable in BOM test
This commit is contained in:
@@ -482,7 +482,7 @@ class IntegrationBase(ABC):
|
||||
)
|
||||
|
||||
if ctx_path.exists():
|
||||
content = ctx_path.read_text(encoding="utf-8")
|
||||
content = ctx_path.read_text(encoding="utf-8-sig")
|
||||
start_idx = content.find(self.CONTEXT_MARKER_START)
|
||||
end_idx = content.find(
|
||||
self.CONTEXT_MARKER_END,
|
||||
@@ -547,7 +547,7 @@ class IntegrationBase(ABC):
|
||||
if not ctx_path.exists():
|
||||
return False
|
||||
|
||||
content = ctx_path.read_text(encoding="utf-8")
|
||||
content = ctx_path.read_text(encoding="utf-8-sig")
|
||||
start_idx = content.find(self.CONTEXT_MARKER_START)
|
||||
end_idx = content.find(
|
||||
self.CONTEXT_MARKER_END,
|
||||
|
||||
Reference in New Issue
Block a user