Browse Source

Fix package validator UTF-8 reads (#214)

Read SKILL.md, README.md, and plugin.json explicitly as UTF-8 so validation works on Windows locales.
tfc-droid 3 weeks ago
parent
commit
dcdc1035c0
1 changed files with 3 additions and 3 deletions
  1. 3 3
      scripts/validate-package.py

+ 3 - 3
scripts/validate-package.py

@@ -9,9 +9,9 @@ from pathlib import Path
 
 
 
 
 ROOT = Path(__file__).resolve().parent.parent
 ROOT = Path(__file__).resolve().parent.parent
-SKILL = (ROOT / "SKILL.md").read_text()
-README = (ROOT / "README.md").read_text()
-PLUGIN = json.loads((ROOT / ".claude-plugin" / "plugin.json").read_text())
+SKILL = (ROOT / "SKILL.md").read_text(encoding="utf-8")
+README = (ROOT / "README.md").read_text(encoding="utf-8")
+PLUGIN = json.loads((ROOT / ".claude-plugin" / "plugin.json").read_text(encoding="utf-8"))
 
 
 
 
 def require(match: re.Match[str] | None, message: str) -> re.Match[str]:
 def require(match: re.Match[str] | None, message: str) -> re.Match[str]: