Skip to content

Commit c192eac

Browse files
committed
fix(root): scope AutoUpgrade and RefreshPackages to install command only
1 parent 8c7c090 commit c192eac

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

internal/cli/root.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ shell configuration, and macOS preferences.`,
4040
config.SetClientVersion(version)
4141
cfg.Version = version
4242

43-
// Skip network operations for lightweight commands that don't
44-
// need the package catalog or auto-update check.
45-
lightweightCmds := map[string]bool{
46-
"version": true,
47-
"help": true,
43+
// Only the install flow needs the package catalog and auto-update.
44+
// All other commands (snapshot, login, logout, etc.) run without
45+
// network overhead.
46+
installCmds := map[string]bool{
47+
"openboot": true, // root command delegates to install
48+
"install": true,
4849
}
49-
if !lightweightCmds[cmd.Name()] {
50+
if installCmds[cmd.Name()] {
5051
updater.AutoUpgrade(version)
5152
config.RefreshPackagesFromRemote()
5253
}

0 commit comments

Comments
 (0)