File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 69
69
spin = spinner .New (spinner .CharSets [style .SpinnerCharacter ], 100 * time .Millisecond , spinner .WithWriter (outFile ))
70
70
// defaultBoxCfg is the default style config for cli box output
71
71
defaultBoxCfg = box.Config {Py : 1 , Px : 4 , Type : "Round" , Color : "Red" }
72
+ // alreadyShoweddGitHubIssueMessage is used to prevent showing the GitHub issue message multiple times
73
+ alreadyShoweddGitHubIssueMessage = false
72
74
)
73
75
74
76
// MaxLogEntries controls the number of log entries to show for each source
@@ -477,6 +479,9 @@ func command() (string, error) {
477
479
}
478
480
479
481
func displayGitHubIssueMessage () {
482
+ if alreadyShoweddGitHubIssueMessage {
483
+ return
484
+ }
480
485
cmd , err := command ()
481
486
if err != nil {
482
487
klog .Warningf ("failed to get command: %v" , err )
@@ -496,6 +501,7 @@ func displayGitHubIssueMessage() {
496
501
}
497
502
498
503
BoxedErr (msg )
504
+ alreadyShoweddGitHubIssueMessage = true
499
505
}
500
506
501
507
// applyTmpl applies formatting
Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ func TestDisplayGitHubIssueMessage(t *testing.T) {
230
230
pflag .Parse ()
231
231
f := tests .NewFakeFile ()
232
232
SetErrFile (f )
233
+ alreadyShoweddGitHubIssueMessage = false // Reset the flag for each test case
233
234
displayGitHubIssueMessage ()
234
235
output := f .String ()
235
236
if strings .Contains (output , msg ) && ! tt .shouldContainMessage {
You can’t perform that action at this time.
0 commit comments