Skip to content

Commit 853a876

Browse files
Merge pull request #395 from depot/repo-detection
Update auto-detection of claude repo
2 parents 9ecd5fe + 53c727f commit 853a876

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pkg/cmd/claude/claude.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,11 @@ Subcommands:
247247
var repoValue string
248248
if repository != nil {
249249
repoValue = *repository
250-
if repoValue == "" {
251-
gitRemoteCmd := exec.CommandContext(ctx, "git", "remote", "get-url", "origin")
252-
if output, err := gitRemoteCmd.Output(); err == nil {
253-
repoValue = strings.TrimSpace(string(output))
254-
fmt.Fprintf(os.Stderr, "Using current git remote repository: %s\n", repoValue)
255-
}
250+
}
251+
if repoValue == "" {
252+
gitRemoteCmd := exec.CommandContext(ctx, "git", "remote", "get-url", "origin")
253+
if output, err := gitRemoteCmd.Output(); err == nil {
254+
repoValue = strings.TrimSpace(string(output))
256255
}
257256
}
258257

0 commit comments

Comments
 (0)