-
Notifications
You must be signed in to change notification settings - Fork 16.3k
fix(setup-gbrain): document Windows MSYS quirks #1963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
maxpetrusenkoagent
wants to merge
1
commit into
garrytan:main
from
maxpetrusenkoagent:hermes/oss-pr-2026年06月10日-gstack-1271
+95
−12
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
43 changes: 43 additions & 0 deletions
test/setup-gbrain-windows-msys-quirks.test.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import { describe, expect, test } from 'bun:test'; | ||
| import * as fs from 'fs'; | ||
| import * as path from 'path'; | ||
|
|
||
| const ROOT = path.resolve(import.meta.dir, '..'); | ||
| const TMPL = path.join(ROOT, 'setup-gbrain', 'SKILL.md.tmpl'); | ||
| const INSTALL = path.join(ROOT, 'bin', 'gstack-gbrain-install'); | ||
|
|
||
| const tmpl = fs.readFileSync(TMPL, 'utf-8'); | ||
| const installer = fs.readFileSync(INSTALL, 'utf-8'); | ||
|
|
||
| describe('setup-gbrain Windows MSYS quirks from issue #1271', () => { | ||
| test('local stdio registration uses gbrain.exe fallback on MSYS/Windows', () => { | ||
| const localStdio = tmpl.match(/### Paths 1, 2a, 2b, 3 \(Local stdio\)[\s\S]*?### Both paths/)?.[0] ?? ''; | ||
|
|
||
| expect(localStdio).toContain('MINGW*|MSYS*|CYGWIN*|Windows_NT'); | ||
| expect(localStdio).toContain('$HOME/.bun/bin/gbrain.exe'); | ||
| expect(localStdio).toContain('GBRAIN_BIN="$HOME/.bun/bin/gbrain.exe"'); | ||
| expect(localStdio).toMatch(/Claude Code on Windows does\s+not apply PATHEXT/); | ||
| }); | ||
|
|
||
| test('local stdio registration warns that PGLite lock contention can make claude mcp list look disconnected', () => { | ||
| const localStdio = tmpl.match(/### Paths 1, 2a, 2b, 3 \(Local stdio\)[\s\S]*?### Both paths/)?.[0] ?? ''; | ||
|
|
||
| expect(localStdio).toContain('PGLite'); | ||
| expect(localStdio).toContain('single-writer lock'); | ||
| expect(localStdio).toContain('Failed to connect'); | ||
| expect(localStdio).toContain('mcp__gbrain__'); | ||
| }); | ||
|
|
||
| test('local smoke test uses gbrain put --content, never stdin pipe', () => { | ||
| const smoke = tmpl.match(/### Paths 1, 2a, 2b, 3 \(Local stdio\)[\s\S]*?Confirms the round trip/)?.[0] ?? ''; | ||
|
|
||
| expect(smoke).toContain('gbrain put "$SLUG" --content'); | ||
| expect(smoke).not.toContain('| gbrain put "$SLUG"'); | ||
| }); | ||
|
|
||
| test('installer documents and preserves the MSYS bun install --ignore-scripts mitigation', () => { | ||
| expect(installer).toContain('MINGW*|MSYS*|CYGWIN*|Windows_NT'); | ||
| expect(installer).toContain('bun install --silent --ignore-scripts'); | ||
| expect(tmpl).toMatch(/On Windows MSYS\/Git Bash, the installer uses\s+`bun install --ignore-scripts`/); | ||
| }); | ||
| }); |
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.