From 5ebdc602d172f3f02d96ec664af4e5c596bddbdf Mon Sep 17 00:00:00 2001 From: Snider Date: Tue, 17 Mar 2026 02:22:04 +0000 Subject: [PATCH] fix: defer doctor i18n.T() to AddDoctorCommands Co-Authored-By: Virgil --- cmd/core/doctor/cmd_commands.go | 7 ++++++- cmd/core/doctor/cmd_doctor.go | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/core/doctor/cmd_commands.go b/cmd/core/doctor/cmd_commands.go index 0bd07e9..6b9bb44 100644 --- a/cmd/core/doctor/cmd_commands.go +++ b/cmd/core/doctor/cmd_commands.go @@ -10,9 +10,14 @@ // Provides platform-specific installation instructions for missing tools. package doctor -import "github.com/spf13/cobra" +import ( + "forge.lthn.ai/core/go-i18n" + "github.com/spf13/cobra" +) // AddDoctorCommands registers the 'doctor' command and all subcommands. func AddDoctorCommands(root *cobra.Command) { + doctorCmd.Short = i18n.T("cmd.doctor.short") + doctorCmd.Long = i18n.T("cmd.doctor.long") root.AddCommand(doctorCmd) } diff --git a/cmd/core/doctor/cmd_doctor.go b/cmd/core/doctor/cmd_doctor.go index bac1f12..a3354d7 100644 --- a/cmd/core/doctor/cmd_doctor.go +++ b/cmd/core/doctor/cmd_doctor.go @@ -21,9 +21,7 @@ var ( var doctorVerbose bool var doctorCmd = &cobra.Command{ - Use: "doctor", - Short: i18n.T("cmd.doctor.short"), - Long: i18n.T("cmd.doctor.long"), + Use: "doctor", RunE: func(cmd *cobra.Command, args []string) error { return runDoctor(doctorVerbose) },