Skip to content

fix(windows): make PowerShell installer parse in 5.1#26481

Closed
nekwo wants to merge 1 commit into
NousResearch:mainfrom
nekwo:fix/windows-installer-utf8-powershell51
Closed

fix(windows): make PowerShell installer parse in 5.1#26481
nekwo wants to merge 1 commit into
NousResearch:mainfrom
nekwo:fix/windows-installer-utf8-powershell51

Conversation

@nekwo

@nekwo nekwo commented May 15, 2026

Copy link
Copy Markdown
Contributor

[5/15/2026 1:07 PM] Tony: ## What does this PR do?

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

scripts/install.ps1

How to Test

  1. run install on windows 10, powershell 5.1, it will stop erroring

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

fill this out too
[5/15/2026 1:07 PM] Alice: 💻 terminal: "cd /x/Eternia/hermes-agent && if comm..."
💻 terminal: "python - <<'PY' import json, urllib.p..."
💻 terminal: "cd /x/Eternia/hermes-agent && test -f..."
[5/15/2026 1:12 PM] Alice: Ahhh yep, Telegram is rendering the nested code fences separately. Use this no-fence plain text block instead — copy from BEGIN to END:

BEGIN PR BODY

What does this PR do?

Fixes Windows PowerShell 5.1 parsing of scripts/install.ps1 by saving the installer with a UTF-8 BOM.

The installer contains Unicode status/branding characters such as check marks, warning symbols, arrows, and box-drawing characters. Windows PowerShell 5.1 can mis-detect UTF-8-without-BOM scripts as a legacy ANSI code page, which may cause parse/rendering failures on fresh Windows installs.

Adding the UTF-8 BOM is the smallest targeted fix: it preserves the existing installer output and makes the file unambiguously UTF-8 for Windows PowerShell 5.1, while remaining compatible with PowerShell 7.

Related Issue

#25191

Fixes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Security fix
  • Documentation update
  • Tests (adding or improving test coverage)
  • Refactor (no behavior change)
  • New skill (bundled or hub)

Changes Made

  • scripts/install.ps1
    • Saved the PowerShell installer as UTF-8 with BOM so Windows PowerShell 5.1 reliably recognizes the script encoding.

How to Test

  1. On Windows, parse the installer with Windows PowerShell 5.1:

    $p = "X:\Eternia\hermes-agent\scripts\install.ps1"
    $text = [System.IO.File]::ReadAllText($p, [System.Text.Encoding]::UTF8)
    [scriptblock]::Create($text) > $null
    Write-Output "parse_ok"

  2. Confirm the output is:

    parse_ok

  3. Optionally run the installer path normally from Windows PowerShell 5.1 or PowerShell 7 and confirm the banner/status output renders without parse errors.

Checklist

Code

Documentation & Housekeeping

  • I've updated relevant documentation — N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — N/A
  • I've considered cross-platform impact: Windows PowerShell 5.1 and PowerShell 7
  • I've updated tool descriptions/schemas if I changed tool behavior — N/A

Screenshots / Logs

PowerShell parse validation:

parse_ok

Additional checks run locally:

git diff --check upstream/main..HEAD
# passed

security scan
# findings=0

END PR BODY

@alt-glitch alt-glitch added P2 Medium — degraded but workaround exists type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard labels May 15, 2026
@nekwo nekwo force-pushed the fix/windows-installer-utf8-powershell51 branch from 03433ab to 85f3027 Compare May 16, 2026 17:17
teknium1 added a commit that referenced this pull request May 17, 2026
…tors

Adds release-note attribution mappings for 10 contributors from the
low-hanging-fruit salvage group 2 batch:
- @shellybotmoyer (PR #26661, #25576)
- @ether-btc (PR #26632)
- @LifeJiggy (PR #26516)
- @nekwo (PR #26481)
- @flooryyyy (PR #26374)
- @dgians (PR #26034, incl. zealy-tzco bot-committer alias)
- @flanny7 (PR #27030)
- @hermesagent26 (PR #26438)
- @kriscolab (PR #26926, co-author on salvage commit)
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #27292 — your commit was cherry-picked onto current main as part of a batch salvage of low-risk new-contributor PRs. Authorship preserved (fix(windows): make PowerShell installer parse in 5.1). Thanks for the contribution.

@teknium1 teknium1 closed this May 17, 2026
@nekwo nekwo deleted the fix/windows-installer-utf8-powershell51 branch May 28, 2026 21:26
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…tors

Adds release-note attribution mappings for 10 contributors from the
low-hanging-fruit salvage group 2 batch:
- @shellybotmoyer (PR NousResearch#26661, NousResearch#25576)
- @ether-btc (PR NousResearch#26632)
- @LifeJiggy (PR NousResearch#26516)
- @nekwo (PR NousResearch#26481)
- @flooryyyy (PR NousResearch#26374)
- @dgians (PR NousResearch#26034, incl. zealy-tzco bot-committer alias)
- @flanny7 (PR NousResearch#27030)
- @hermesagent26 (PR NousResearch#26438)
- @kriscolab (PR NousResearch#26926, co-author on salvage commit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants