Repository navigation
Conversation
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Fixes #183 (duplicate: #185).
scripts/hunt.ps1,scripts/install.ps1andscripts/install-community-skills.ps1are saved as UTF-8 with a BOM. The text is unchanged — the em dashes and other non-ASCII characters stay exactly as they are.Windows PowerShell 5.1 reads a
.ps1with no BOM in the system ANSI code page, so a UTF-8 em dash (E2 80 94) is decoded as—. Inhunt.ps1that lands inside a double-quoted string and the stray"ends the string early, so the whole file fails to parse. Because the file is dot-sourced from$PROFILE, every new PowerShell window throws parser errors andhuntis never defined. With a BOM, 5.1 decodes the file as UTF-8 and it parses cleanly. PowerShell 7 reads UTF-8 either way, so nothing changes there.Reproduced on Windows PowerShell 5.1 by reading each file with
[System.Text.Encoding]::Defaultand parsing it: 8 parser errors before, 0 after.huntdot-sources and scaffolds correctly afterwards.Type
Checklist
python3 scripts/lint_skills.pypasses locally (frontmatter, name, description length, identifier/secret scan).nameis lowercase-hyphen; description ≤ 1024 chars and weaves in trigger keywords; body ≤ ~500 lines.README.md+USAGE.mddecision tree, with one worked trigger example.Anything reviewers should know?
The
powershell-smokejob already parses the scripts, but it runs onpwsh(PowerShell 7), which reads UTF-8 with or without a BOM — so it can never catch this class of bug. I added one step to that job that runs undershell: powershell(5.1 onwindows-latest): it reads each file withEncoding.Default(the ANSI code page, as 5.1 does when there's no BOM), parses it with the PowerShell parser, then dot-sourceshunt.ps1and checks thathuntis defined. It fails on the currentmainand passes with this change.No skill content, frontmatter or behaviour changes — only the three files' encoding plus that CI step.
python3 -m pytestandscripts/lint_skills.pyare unchanged and pass.