#681 BUG: osctrl-cli node tag: wrong validation + no-op when tag missing
Issue created by
KshitijPatil98
In tagNode, the code checks env twice and never validates --tag-value. In DB mode it only tags if tagsmgr.Exists(tag); if the tag doesn’t exist, it does nothing but still prints success.
Expected: validate --tag-value; create-or-error when tag absent; print success only after attach.
env := c.String("env")
if env == "" {
fmt.Println("❌ environment is required")
os.Exit(1)
}
tag := c.String("tag-value")
if env == "" { // BUG: should be `if tag == ""`
fmt.Println("❌ tag is required")
os.Exit(1)
jmpsec/osctrl