fix: persistent flag option typo (#9374)

This commit is contained in:
Pueringni3
2025-08-25 08:43:16 +09:00
committed by GitHub
parent d1adbe3579
commit 6e99dd304c

View File

@@ -317,7 +317,7 @@ func (f *Flag[T]) Bind(cmd *cobra.Command) error {
// Bind CLI flags
flag := cmd.Flags().Lookup(f.Name)
if f == nil {
if flag == nil {
// Lookup local persistent flags
flag = cmd.PersistentFlags().Lookup(f.Name)
}