fix: defer doctor i18n.T() to AddDoctorCommands
Some checks failed
Deploy / build (push) Failing after 4s
Security Scan / security (push) Successful in 15s

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-17 02:22:04 +00:00
parent d67295ad2a
commit 5ebdc602d1
2 changed files with 7 additions and 4 deletions

View file

@ -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)
}

View file

@ -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)
},