Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clean-roots-match.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'frog': patch
---

Normalize Git repository roots before binding the file store so Windows commands accept equivalent path separators.
9 changes: 9 additions & 0 deletions src/cli/internal/context.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import path from 'node:path'
import * as helpers from '../../../test/helpers.js'
import * as context from './context.js'

test('behavior: normalizes the repository root for local consumers', async () => {
const cwd = await helpers.repo()

expect((await context.resolve({ cwd })).root).toBe(path.resolve(cwd))
})
3 changes: 2 additions & 1 deletion src/cli/internal/context.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import path from 'node:path'
import { z } from 'incur'
import * as Config from '../../Config.js'
import * as Git from '../../Git.js'
Expand All @@ -17,7 +18,7 @@ export type Context = {
*/
export async function resolve(options: resolve.Options = {}): Promise<Context> {
const cwd = options.cwd ?? process.cwd()
const root = (await Git.root({ cwd })) ?? cwd
const root = path.resolve((await Git.root({ cwd })) ?? cwd)
const remote = await Git.repo({ cwd: root })
const config = await Config.resolve({
root,
Expand Down