Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Handle missing update command context

Cursor Agentba2e76aef023
diff --git a/cli/beacon/cmd/update.go b/cli/beacon/cmd/update.go
index 50a306b9..9a38ad3f 100644
--- a/cli/beacon/cmd/update.go
+++ b/cli/beacon/cmd/update.go
@@ -35,7 +35,11 @@ var updateCheckCmd = &cobra.Command{
}
func runUpdateCheck(cmd *cobra.Command, args []string) error {
- ctx, cancel := context.WithTimeout(cmd.Context(), updateCheckTimeout)
+ parent := cmd.Context()
+ if parent == nil {
+ parent = context.Background()
+ }
+ ctx, cancel := context.WithTimeout(parent, updateCheckTimeout)
defer cancel()
result, err := newUpdateChecker(version.GetVersion()).Check(ctx)