Skip to content

fix: detect Scoop Git Bash on Windows - #529

Merged
7Sageer merged 4 commits into
MoonshotAI:mainfrom
7Sageer:fix/scoop-git-bash-detection
Jun 8, 2026
Merged

fix: detect Scoop Git Bash on Windows#529
7Sageer merged 4 commits into
MoonshotAI:mainfrom
7Sageer:fix/scoop-git-bash-detection

Conversation

@7Sageer

@7Sageer 7Sageer commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue. This is a focused bug fix for Windows Git Bash detection when Git is installed through package-manager shims such as Scoop.

Problem

Kimi Code expects Git Bash on Windows, but the previous detection path could miss Git installed through Scoop. Scoop exposes git.exe through a shim, while the actual bash.exe lives under the Scoop app directory, so direct path inference from the shim can fail.

What changed

  • Scan Windows PATH for absolute git.exe candidates, preserving PATH order and skipping relative PATH entries before any git --exec-path probing.
  • For each git.exe, check the conventional Git for Windows bin\bash.exe and usr\bin\bash.exe paths, then use git --exec-path to resolve shim-based installs before moving to the next PATH candidate.
  • Keep well-known Program Files and LOCALAPPDATA Git Bash locations as fallback candidates.
  • Add regression coverage for Scoop shims, PATH ordering, usr\bin\bash.exe, relative PATH entries, and multiple Git matches.
  • Update bilingual environment-variable docs and add a changeset.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5b582d6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@moonshot-ai/kaos Patch
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@7Sageer
7Sageer force-pushed the fix/scoop-git-bash-detection branch from 60d75cf to 15a59fc Compare June 8, 2026 04:54
@pkg-pr-new

pkg-pr-new Bot commented Jun 8, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@5b582d6
npx https://pkg.pr.new/@moonshot-ai/kimi-code@5b582d6

commit: 5b582d6

@7Sageer
7Sageer merged commit 3b62b12 into MoonshotAI:main Jun 8, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 8, 2026
sailist pushed a commit that referenced this pull request Jun 9, 2026
* fix: detect Scoop Git Bash on Windows

* fix: harden Git Bash shim detection

* fix(kaos): preserve Git Bash PATH priority
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