Skip to content

Commit 3fd9d48

Browse files
committed
handle config path error in show command
1 parent 972d6d6 commit 3fd9d48

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/prw/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ var configShowCmd = &cobra.Command{
223223
return fmt.Errorf("failed to load config: %w", err)
224224
}
225225

226-
path, _ := config.ConfigPath()
226+
path, err := config.ConfigPath()
227+
if err != nil {
228+
return fmt.Errorf("failed to determine config path: %w", err)
229+
}
227230
fmt.Printf("Config file: %s\n\n", path)
228231
fmt.Printf("poll_interval_seconds: %d\n", cfg.PollIntervalSeconds)
229232
fmt.Printf("webhook_url: %s\n", cfg.WebhookURL)

0 commit comments

Comments
 (0)