Skip to content

Windows Platform fixes for "self-update" and "go"#54

Merged
captainsafia merged 5 commits intocaptainsafia:mainfrom
SeanKilleen:53_fix-self-update-windows
Feb 21, 2026
Merged

Windows Platform fixes for "self-update" and "go"#54
captainsafia merged 5 commits intocaptainsafia:mainfrom
SeanKilleen:53_fix-self-update-windows

Conversation

@SeanKilleen
Copy link
Contributor

@SeanKilleen SeanKilleen commented Feb 18, 2026

Resolves #53.

Summary

Fixes Windows compatibility issues where shell commands were using Unix-specific executables (sh) that don't exist on Windows.

Problems

  1. grove self-update - Used sh -c "curl ... | sh" which fails on Windows with "Executable not found in $PATH: sh"
  2. grove go - Used $SHELL environment variable with fallback to /bin/sh, neither of which exist on Windows

Changes

  • utils/index.ts - Added platform detection utilities with dependency injection for testability:
    • isWindows(platform?) - Single source of truth for Windows platform check
    • getShellForPlatform(platform?, env?) - Returns appropriate shell for the platform
    • getSelfUpdateCommand(url, platform?) - Returns command/args for self-update installer
  • self-update.ts - Uses getSelfUpdateCommand() to get platform-appropriate installer (PowerShell on Windows, curl|sh on Unix)
  • go.ts - Uses getShellForPlatform() to spawn appropriate shell (PowerShell on Windows, $SHELL on Unix)
  • cli.test.ts - Added 14 tests for platform detection utilities covering Windows, Linux, and macOS

@SeanKilleen
Copy link
Contributor Author

Going to fix up the tests -- I had Claude do them and they came out real weak. 😅 Still experimenting with it.

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

🌳 Grove PR Build Ready!

Version: 1.4.0-pr.54.61d40fe

Install with:

curl https://i.safia.sh/captainsafia/grove/pr/54 | sh

Or if you already have grove installed:

grove self-update --pr 54

Or download directly from Actions Artifacts

Available binaries:

  • grove-linux-x64
  • grove-linux-arm64
  • grove-darwin-x64
  • grove-darwin-arm64
  • grove-windows-x64.exe

@SeanKilleen
Copy link
Contributor Author

Alright @captainsafia I think this is ready for your pass/review at your leisure.

Sorry I missed this the first go 'round!

Copy link
Owner

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for pruning Claude's work here. 😄

@captainsafia captainsafia merged commit 860df62 into captainsafia:main Feb 21, 2026
6 checks passed
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.

grove self-update Error: Executable not found in $PATH: "sh"

2 participants