fix(core): add registry path output to commit/push/pull commands
Show which registry file is being used (or if scanning directory) for better debugging when commands behave unexpectedly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b332f91559
commit
61e446b5ff
3 changed files with 9 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ func runCommit(registryPath string, all bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to load registry: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Registry:"), registryPath)
|
||||
} else {
|
||||
registryPath, err = repos.FindRegistry()
|
||||
if err == nil {
|
||||
|
|
@ -48,6 +49,7 @@ func runCommit(registryPath string, all bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to load registry: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Registry:"), registryPath)
|
||||
} else {
|
||||
// Fallback: scan current directory
|
||||
cwd, _ := os.Getwd()
|
||||
|
|
@ -55,6 +57,7 @@ func runCommit(registryPath string, all bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to scan directory: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Scanning:"), cwd)
|
||||
registryPath = cwd
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ func runPull(registryPath string, all bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to load registry: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Registry:"), registryPath)
|
||||
} else {
|
||||
registryPath, err = repos.FindRegistry()
|
||||
if err == nil {
|
||||
|
|
@ -47,6 +48,7 @@ func runPull(registryPath string, all bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to load registry: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Registry:"), registryPath)
|
||||
} else {
|
||||
// Fallback: scan current directory
|
||||
cwd, _ := os.Getwd()
|
||||
|
|
@ -54,6 +56,7 @@ func runPull(registryPath string, all bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to scan directory: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Scanning:"), cwd)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ func runPush(registryPath string, force bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to load registry: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Registry:"), registryPath)
|
||||
} else {
|
||||
registryPath, err = repos.FindRegistry()
|
||||
if err == nil {
|
||||
|
|
@ -46,6 +47,7 @@ func runPush(registryPath string, force bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to load registry: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Registry:"), registryPath)
|
||||
} else {
|
||||
// Fallback: scan current directory
|
||||
cwd, _ := os.Getwd()
|
||||
|
|
@ -53,6 +55,7 @@ func runPush(registryPath string, force bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to scan directory: %w", err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", dimStyle.Render("Scanning:"), cwd)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue