diff --git a/internal/cmd/commands/targetscmd/funcs.go b/internal/cmd/commands/targetscmd/funcs.go index c0a9c69c97..0905e74976 100644 --- a/internal/cmd/commands/targetscmd/funcs.go +++ b/internal/cmd/commands/targetscmd/funcs.go @@ -315,6 +315,9 @@ func extraFlagsHandlingFuncImpl(c *Command, _ *base.FlagSets, opts *[]targets.Op if strutil.StrListContains(flagsMap[c.Func], "scope-id") && c.FlagScopeId != "" { *opts = append(*opts, targets.WithScopeId(c.FlagScopeId)) } + if strutil.StrListContains(flagsMap[c.Func], "scope-name") && c.FlagScopeName != "" { + *opts = append(*opts, targets.WithScopeName(c.FlagScopeName)) + } switch c.Func { case "add-host-sources", "remove-host-sources":