mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
* feat(docker): run container as host user with bind-mounted workspace * fix(docker): warn on workspace gid mismatch as well as uid * fix(docker): eval snippet passed as positional arg in container-user tests * docs(installation): drop stale host repository access reference
15 lines
402 B
TypeScript
15 lines
402 B
TypeScript
import { existsSync } from 'fs'
|
|
import { dirname, join, resolve } from 'path'
|
|
|
|
export function findRepoRoot(start: string): string {
|
|
let dir = start
|
|
while (!existsSync(join(dir, 'pnpm-workspace.yaml'))) {
|
|
const parent = dirname(dir)
|
|
if (parent === dir) throw new Error('repo root not found')
|
|
dir = parent
|
|
}
|
|
return dir
|
|
}
|
|
|
|
export const repoRoot = findRepoRoot(resolve(process.cwd()))
|