datalust / datalust/seqcli

Better cope with PowerShell sending a BOM (Windows), or stop trying

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
167
Forks
30
Avg merge
1d 6h
Merged PRs (30d)
9

Description

Version 5.1.213 includes a small hack to try to get around encoding issues when running seqcli under PowerShell on Windows: https://github.com/datalust/seqcli/blob/dev/src/SeqCli/PlainText/Framing/FrameReader.cs#L39

Unfortunately, this is racy, and doesn't work all the time.

Our options are:

  • Dig deeper to figure out how it is that the BOM gets through, even with a UTF-8 encoding specified for STDIN
  • Try to skip the BOM in more places (when we read the first line in FrameReader
  • Stop trying

I think we're better off giving up; PowerShell Core no longer has this issue (verified with 6.2), so it's a point-in-time thing anyway.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/SeqCli/PlainText/Framing/FrameReader.cs at line 39 and understand the existing BOM workaround for PowerShell 5.1 on Windows. Reproduce the behavior if possible, compare it with PowerShell Core 6.2, and confirm which option the maintainer wants; done means the selected behavior is implemented and the affected command-line input path is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.