Skip to content

fix(install.ps1): remove UTF-8 BOM that breaks irm | iex path - #28732

Closed
LifeJiggy wants to merge 1 commit into
NousResearch:mainfrom
LifeJiggy:fix/install-ps1-bom
Closed

fix(install.ps1): remove UTF-8 BOM that breaks irm | iex path#28732
LifeJiggy wants to merge 1 commit into
NousResearch:mainfrom
LifeJiggy:fix/install-ps1-bom

Conversation

@LifeJiggy

Copy link
Copy Markdown
Contributor

Title: fix(install.ps1): remove UTF-8 BOM that breaks irm | iex path

What does this PR do?

The UTF-8 BOM (EF BB BF) at byte 0 of scripts/install.ps1 causes [scriptblock]::Create to fail with 'The assignment expression is not valid' on param defaults, breaking the canonical irm https://... | iex one-liner for Windows installation.

PowerShell's normal file-execution path (& .\install.ps1) handles BOMs fine, but the irm-and-iex path uses [scriptblock]::Create((irm ...)) which does NOT strip BOMs — the BOM lands inside the param() block and corrupts the parser state. Since the file contains no non-ASCII characters, the BOM is unnecessary for PS 5.1 parsing.

Related Issue

Fixes #28071

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • scripts/install.ps1: Removed the 3-byte UTF-8 BOM prefix (byte 0xEF 0xBB 0xBF)

How to Test

  1. Open a fresh PowerShell 5.1 session
  2. Run: irm https://raw.githubusercontent.com/LifeJiggy/hermes-agent/fix/install-ps1-bom/scripts/install.ps1 | iex
  3. Verify the installer starts normally instead of failing with The assignment expression is not valid
  4. Also verify & .\scripts\install.ps1 still works for local execution

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature
  • I've run pytest tests/ -q and all tests pass
  • I've tested on my platform: Windows 11

Documentation & Housekeeping

  • N/A — no config, docs, or schema changes

The UTF-8 BOM (EF BB BF) at byte 0 causes [scriptblock]::Create to fail
with 'The assignment expression is not valid' on param defaults, breaking
the canonical 'irm ... | iex' one-liner for Windows installation.

PowerShell's normal file-execution path (& .\install.ps1) handles BOMs
fine regardless, but the irm-and-iex path uses [scriptblock]::Create which
does NOT strip BOMs. Since the file contains no non-ASCII characters, the
BOM is unnecessary for PS 5.1 parsing.

Fixes NousResearch#28071.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels May 19, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate — #28169 (merged 2026-05-19) already stripped the BOM from install.ps1 and added -Commit/-Tag pin params. This PR's change is already in main.

@LifeJiggy LifeJiggy closed this May 19, 2026
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 duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix critical syntax error in install.ps1 that breaks Windows installation

2 participants