From 792be8601a1d2d082c43eb94abc58fc8e6a5dce7 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Wed, 13 May 2026 14:16:48 -0700 Subject: [PATCH] fix: disable upgrade notification for the api command --- internal/update/update.go | 2 +- internal/update/update_test.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/update/update.go b/internal/update/update.go index 984c56da..0498e611 100644 --- a/internal/update/update.go +++ b/internal/update/update.go @@ -223,7 +223,7 @@ func (u *UpdateNotification) isCI() bool { // isIgnoredCommand returns true when the process is in the list of commands. func (u *UpdateNotification) isIgnoredCommand() bool { - ignoredCommands := []string{"_fingerprint", "version"} + ignoredCommands := []string{"_fingerprint", "api", "version"} osStr := os.Args[0:] if len(osStr) < 2 { return false diff --git a/internal/update/update_test.go b/internal/update/update_test.go index 1ef37dca..f1e28ab6 100644 --- a/internal/update/update_test.go +++ b/internal/update/update_test.go @@ -153,6 +153,10 @@ func Test_UpdateNotification_isIgnoredCommand(t *testing.T) { command: "", expected: false, }, + "api command": { + command: "api", + expected: true, + }, "fingerprint command": { command: "_fingerprint", expected: true,