Skip to content

Commit f2e54bc

Browse files
authored
fix: disable upgrade notification for the api command (#542)
1 parent bef3a23 commit f2e54bc

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

internal/update/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (u *UpdateNotification) isCI() bool {
223223

224224
// isIgnoredCommand returns true when the process is in the list of commands.
225225
func (u *UpdateNotification) isIgnoredCommand() bool {
226-
ignoredCommands := []string{"_fingerprint", "version"}
226+
ignoredCommands := []string{"_fingerprint", "api", "version"}
227227
osStr := os.Args[0:]
228228
if len(osStr) < 2 {
229229
return false

internal/update/update_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ func Test_UpdateNotification_isIgnoredCommand(t *testing.T) {
153153
command: "",
154154
expected: false,
155155
},
156+
"api command": {
157+
command: "api",
158+
expected: true,
159+
},
156160
"fingerprint command": {
157161
command: "_fingerprint",
158162
expected: true,

0 commit comments

Comments
 (0)