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:
@@ -1025,6 +1025,5 @@ func checkGitHooks(path string) doctorCheck {
|
||||
}
|
||||
|
||||
func init() {
|
||||
doctorCmd.Flags().Bool("json", false, "Output JSON format")
|
||||
rootCmd.AddCommand(doctorCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user