Skip to content

Commit 5a11498

Browse files
review: copilot findings
1 parent e561fc7 commit 5a11498

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

internal/core/flag-option.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func WithCompletionComplex(
9393
if directive == cobra.ShellCompDirectiveError {
9494
continue // skip failed locations
9595
}
96-
mergedDirective &= directive
96+
mergedDirective |= directive
9797
for _, r := range results {
9898
if strings.Contains(r, "\t") {
9999
allResults = append(allResults, r+" ("+loc+")")

internal/core/regional_list.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (c *CommandConfig) ListAllLocations(
113113
}
114114

115115
// Partial failure : warn only for failed locations (sorted for stable output)
116-
if len(errCounts) > 0 {
116+
if len(errCounts) > 0 && !viper.GetBool(constants.ArgQuiet) {
117117
stderr := c.Command.Command.ErrOrStderr()
118118
var warns []string
119119
for msg, locs := range errCounts {
@@ -219,7 +219,9 @@ func (c *CommandConfig) regionalText(results []locResult, columns []table.Column
219219
// Extract rows from this location's response
220220
locTable := table.New(columns, table.WithPrefix("items"))
221221
if err := locTable.Extract(r.data); err != nil {
222-
fmt.Fprintf(c.Command.Command.ErrOrStderr(), "WARN: failed to parse response from %s: %v\n", r.location, err)
222+
if !viper.GetBool(constants.ArgQuiet) {
223+
fmt.Fprintf(c.Command.Command.ErrOrStderr(), "WARN: failed to parse response from %s: %v\n", r.location, err)
224+
}
223225
continue
224226
}
225227

0 commit comments

Comments
 (0)