Fix bd doctor --json flag not working (bd-6049)

The --json flag was being ignored because doctor.go defined a local
flag that shadowed the persistent --json flag from main.go. The local
flag wasn't bound to the global jsonOutput variable, so it remained
false even when --json was passed.

Fixed by removing the duplicate local flag definition. The doctor
command now correctly uses the global persistent flag.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-02 17:14:02 -08:00
parent 31c39f17d5
commit 0599cb732f

View File

@@ -1025,6 +1025,5 @@ func checkGitHooks(path string) doctorCheck {
}
func init() {
doctorCmd.Flags().Bool("json", false, "Output JSON format")
rootCmd.AddCommand(doctorCmd)
}