Skip to content

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

Move update check under version command

Cursor Agent1f26aeab4764
diff --git a/cli/beacon/cmd/update.go b/cli/beacon/cmd/update.go
index 84ebb68d..acc5ea5c 100644
--- a/cli/beacon/cmd/update.go
+++ b/cli/beacon/cmd/update.go
@@ -22,12 +22,7 @@ var (
updateCheckTimeout = 2 * time.Second
)
-var updateCmd = &cobra.Command{
- Use: "update",
- Short: "Check for Beacon CLI updates",
-}
-
-var updateCheckCmd = &cobra.Command{
+var versionCheckCmd = &cobra.Command{
Use: "check",
Short: "Check whether a newer Beacon CLI release is available",
SilenceUsage: true,
@@ -69,6 +64,5 @@ func runUpdateCheck(cmd *cobra.Command, args []string) error {
}
func init() {
- updateCmd.AddCommand(updateCheckCmd)
- rootCmd.AddCommand(updateCmd)
+ versionCmd.AddCommand(versionCheckCmd)
}
diff --git a/cli/beacon/cmd/update_test.go b/cli/beacon/cmd/update_test.go
index 99143390..43492aab 100644
--- a/cli/beacon/cmd/update_test.go
+++ b/cli/beacon/cmd/update_test.go
@@ -25,13 +25,13 @@ func (c stubUpdateChecker) Check(context.Context) (updatecheck.Result, error) {
return c.result, nil
}
-func TestUpdateCheckCommandRegistered(t *testing.T) {
- cmd, _, err := rootCmd.Find([]string{"update", "check"})
+func TestVersionCheckCommandRegistered(t *testing.T) {
+ cmd, _, err := rootCmd.Find([]string{"version", "check"})
if err != nil {
- t.Fatalf("Find update check returned error: %v", err)
+ t.Fatalf("Find version check returned error: %v", err)
}
if cmd == nil || cmd.Use != "check" {
- t.Fatalf("update check command not registered: %#v", cmd)
+ t.Fatalf("version check command not registered: %#v", cmd)
}
}