Skip to content

Commit 0aa2db5

Browse files
Soft-Serveclaude
andcommitted
fix: fall back to cwd when git repo root cannot be determined
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3c8028a commit 0aa2db5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/util/util.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ func ComputeRootDir(c *cli.Context) {
143143
var err error
144144
_rootDir, err = GetGitRepoRoot()
145145
if err != nil {
146-
log.Fatal(err)
146+
log.Warn("Could not determine git repo root, falling back to current working directory")
147+
_rootDir, err = os.Getwd()
148+
if err != nil {
149+
log.Fatal(err)
150+
}
147151
}
148152
log.Trace("Using root directory: '", _rootDir, "'")
149153

0 commit comments

Comments
 (0)