From 25a5ee06dd4da828f8d47193933103dcfcfc4ebb Mon Sep 17 00:00:00 2001 From: Spicer Matthews Date: Sun, 5 Jul 2026 09:39:26 -0700 Subject: [PATCH] projects: warn via stderr, not log.Printf, when pane labeling fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to #33. The pane-label failure warning used log.Printf, which stamps a timestamp prefix and pulled in the log package solely for this one line — unlike the rest of the plugin, which emits messages via fmt to stdout/stderr with a "herdr-plus:" prefix (captured in the plugin log). Match that convention and drop the now-unused log import. Behavior is unchanged: labeling stays best-effort and a failure never aborts building the workspace. --- projects.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects.go b/projects.go index 0acfccf..1891db2 100644 --- a/projects.go +++ b/projects.go @@ -9,7 +9,6 @@ package main import ( "errors" "fmt" - "log" "os" "os/exec" "path/filepath" @@ -194,7 +193,8 @@ func layoutTabs(client *herdrClient, ws, rootTab, rootPane string, tabs []Projec } if lbl := strings.TrimSpace(pane.Label); lbl != "" { if err := client.paneRename(paneID, lbl); err != nil { - log.Printf("warning: failed to label pane %d in tab %q: %v", j+1, t.Name, err) + // Labeling is cosmetic — warn but keep building the workspace. + fmt.Fprintf(os.Stderr, "herdr-plus: failed to label pane %d in tab %q: %v\n", j+1, t.Name, err) } } if strings.TrimSpace(pane.Command) != "" {