Skip to content

fix(cli): normalize repository root paths - #88

Open
omerbek wants to merge 1 commit into
wevm:mainfrom
omerbek:fix/windows-repository-root
Open

omerbek wants to merge 1 commit into
wevm:mainfrom
omerbek:fix/windows-repository-root

Conversation

@omerbek

@omerbek omerbek commented Oct 16, 2026

Copy link
Copy Markdown

Summary

  • normalize the resolved Git repository root before it reaches CLI consumers
  • keep file-store root comparisons stable across Windows path separator forms
  • add a regression test for the platform-normalized root invariant
  • include a patch changeset

Problem

On Windows, git rev-parse --show-toplevel can return a root such as C:/repo, while Store.file normalizes the same path to C:\\repo. log and sync compare those strings and reject the equivalent paths with STORE_ROOT_MISMATCH.

Root cause

context.resolve forwarded Git's root verbatim, while the file store independently passed its root through path.resolve.

Change

Normalize the repository root once in context.resolve with path.resolve. This gives config, remotes, the default file store, and injected-store validation one canonical platform path.

Fixes #82.

Testing

  • corepack pnpm test src/cli/internal/context.test.ts — 1 passed
  • corepack pnpm check:types — passed
  • corepack pnpm check — formatting, lint, and type checks passed for 115 files
  • Windows CLI smoke in a temporary Git repository — frog log ... --cwd <temp> created one pending entry and exited 0
  • Combined context/log/sync test command: context and sync suites passed (31 tests); the log suite could not start because no Docker/container runtime is installed for its PostgreSQL fixture

Risk

Low. The change only canonicalizes the root path before existing consumers use it. Different real directories still fail the injected-store root check; equivalent Windows separator forms no longer do.

Additional verification note

corepack pnpm build reaches zile but fails on this Windows environment when zile spawns node_modules/.bin/tsc without the Windows command shim (ENOENT). The repository's direct pnpm check:types command passes.

@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown

@omerbek is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

frog log rejects Windows repository roots

1 participant