From e5ef596950bbc5053d5bb0ad89be4b2ddc70713b Mon Sep 17 00:00:00 2001 From: Jacopo Falcone <127383002+f1g0n4cc1@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:30:16 +0200 Subject: [PATCH 1/2] fix(cli): provide usage hint when no plugins found (fixes #88) --- plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.go b/plugin.go index 4ece835..22b960e 100644 --- a/plugin.go +++ b/plugin.go @@ -257,7 +257,7 @@ func newPlugins() (*plugins, error) { func (p *plugins) print() { if len(p.local) == 0 && len(p.ops) == 0 { debug("No plugins installed") - fmt.Println("No plugins installed. Use 'ops -plugin' to add new ones.") + fmt.Println("No plugins installed. Use ops -plugin to install one.") return } From fd6774b7567ea255059de38ebb8c85885ce10ae8 Mon Sep 17 00:00:00 2001 From: Jacopo Falcone <127383002+f1g0n4cc1@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:30:46 +0200 Subject: [PATCH 2/2] fix(cli): only suggest operator updates if installed (fixes #41) --- prepare.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/prepare.go b/prepare.go index 489e74a..e084f07 100644 --- a/prepare.go +++ b/prepare.go @@ -223,6 +223,18 @@ func autoCLIUpdate() error { func checkOperatorVersion(opsRootConfig map[string]interface{}) error { trace("checkOperatorVersion") + // --- NEW: Check for active operator installation --- + // Execute "ops debug operator:version" to see if an operator is currently deployed. + debugCmd := exec.Command(os.Getenv("OPS_CMD"), "debug", "operator:version") + output, err := debugCmd.Output() + if err != nil || strings.TrimSpace(string(output)) == "" { + // No operator installed or command failed, so suppress the update suggestion. + debug("No active operator installation detected or command failed:", err, "output:", strings.TrimSpace(string(output))) + return fmt.Errorf("no active operator installation detected") // Return an error to prevent printing the update message + } + debug("Active operator version detected:", strings.TrimSpace(string(output))) + // --- END NEW --- + images := opsRootConfig["images"].(map[string]interface{}) operator := images["operator"].(string) opVer := strings.Split(operator, ":")[1]