Skip to content

Fix: Remove UTF-8 BOM breaking iwr | iex install#1

Open
RawCooked wants to merge 1 commit into
mainfrom
claude/blissful-hertz-159919
Open

Fix: Remove UTF-8 BOM breaking iwr | iex install#1
RawCooked wants to merge 1 commit into
mainfrom
claude/blissful-hertz-159919

Conversation

@RawCooked

Copy link
Copy Markdown
Owner

Summary

  • Stripped the UTF-8 BOM (EF BB BF) from install.ps1, core.ps1, and utils.ps1

Problem

Running the one-command install:

iwr https://rawcooked.github.io/Kitly/install.ps1 | iex

failed with:

???<# : The term '???<#' is not recognized as the name of a cmdlet...

The ??? are the UTF-8 BOM bytes rendered as replacement characters. When iwr downloads the script and pipes it as a string to Invoke-Expression, PowerShell does not strip the BOM — it treats it as part of the command name, causing an immediate crash.

Fix

Re-encoded all three .ps1 files as UTF-8 without BOM using System.Text.UTF8Encoding($false). The scripts are otherwise identical — only the invisible leading bytes changed.

Testing

Verify the first bytes of each file are now 3C 23 (<#) rather than EF BB BF 3C 23.

The BOM bytes (EF BB BF) caused `iwr ... | iex` to fail with
"???<# is not recognized" because PowerShell does not strip the
BOM when executing piped string content via Invoke-Expression.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant