{"record":{"id":"dbd4c757dda85362","repo":"helm/helm","slug":"invalid-wait-input-q-valid-inputs-are-s-s-an","errorCode":null,"errorMessage":"invalid wait input %q. Valid inputs are %s, %s, and %s","messagePattern":"invalid wait input %q\\. Valid inputs are (.+?), (.+?), and (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/flags.go","lineNumber":116,"sourceCode":"\t}\n\treturn string(*ws)\n}\n\nfunc (ws *waitValue) Set(s string) error {\n\tswitch s {\n\tcase string(kube.StatusWatcherStrategy), string(kube.LegacyStrategy), string(kube.HookOnlyStrategy):\n\t\t*ws = waitValue(s)\n\t\treturn nil\n\tcase \"true\":\n\t\tslog.Warn(\"--wait=true is deprecated (boolean value) and can be replaced with --wait=watcher\")\n\t\t*ws = waitValue(kube.StatusWatcherStrategy)\n\t\treturn nil\n\tcase \"false\":\n\t\tslog.Warn(\"--wait=false is deprecated (boolean value) and can be replaced with --wait=hookOnly\")\n\t\t*ws = waitValue(kube.HookOnlyStrategy)\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid wait input %q. Valid inputs are %s, %s, and %s\", s, kube.StatusWatcherStrategy, kube.HookOnlyStrategy, kube.LegacyStrategy)\n\t}\n}\n\nfunc (ws *waitValue) Type() string {\n\treturn \"WaitStrategy\"\n}\n\nfunc addChartPathOptionsFlags(f *pflag.FlagSet, c *action.ChartPathOptions) {\n\tf.StringVar(&c.Version, \"version\", \"\", \"specify a version constraint for the chart version to use. This constraint can be a specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0). If this is not specified, the latest version is used\")\n\tf.BoolVar(&c.Verify, \"verify\", false, \"verify the package before using it\")\n\tf.StringVar(&c.Keyring, \"keyring\", defaultKeyring(), \"location of public keys used for verification\")\n\tf.StringVar(&c.RepoURL, \"repo\", \"\", \"chart repository url where to locate the requested chart\")\n\tf.StringVar(&c.Username, \"username\", \"\", \"chart repository username where to locate the requested chart\")\n\tf.StringVar(&c.Password, \"password\", \"\", \"chart repository password where to locate the requested chart\")\n\tf.StringVar(&c.CertFile, \"cert-file\", \"\", \"identify HTTPS client using this SSL certificate file\")\n\tf.StringVar(&c.KeyFile, \"key-file\", \"\", \"identify HTTPS client using this SSL key file\")\n\tf.BoolVar(&c.InsecureSkipTLSVerify, \"insecure-skip-tls-verify\", false, \"skip tls certificate checks for the chart download\")\n\tf.BoolVar(&c.PlainHTTP, \"plain-http\", false, \"use insecure HTTP connections for the chart download\")","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/pkg/cmd/flags.go#L98-L134","documentation":"Helm 4 replaced the boolean --wait flag with a wait-strategy flag. The custom pflag value parser in pkg/cmd/flags.go accepts 'watcher' (event-driven kstatus waits), 'legacy' (Helm 3-style periodic polling), and 'hookOnly' (wait only for hook Pods/Jobs), plus the deprecated booleans true/false which map to watcher/hookOnly with a warning. Any other string reaches the default branch and is rejected before the command runs.","triggerScenarios":"`helm install --wait=whatever`, `--wait=yes`, `--wait=Watcher` (values are case-sensitive), or any string not in {watcher, legacy, hookOnly, true, false}. Bare `--wait` is fine: its NoOptDefVal is 'watcher' (pkg/cmd/flags.go:65).","commonSituations":"Scripts written for Helm 3 where --wait took true/false; CI pipelines copying example commands with invented strategy names; case mismatches like 'Legacy' or 'HookOnly' vs the exact 'legacy'/'hookOnly'.","solutions":["Use an exact strategy name: --wait=watcher, --wait=legacy, or --wait=hookOnly","Keep old Helm 3 scripts working with --wait=true (maps to watcher) or --wait=false (maps to hookOnly); these only log a deprecation warning","Use bare `--wait` if the default (watcher) is acceptable"],"exampleFix":"# before (Helm 3 style with an invalid value)\nhelm install myrel ./chart --wait=yes\n# error: invalid wait input \"yes\"\n\n# after\nhelm install myrel ./chart --wait=watcher","handlingStrategy":"validation","validationCode":"var validWaitInputs = map[string]bool{\n    \"watcher\": true, \"legacy\": true, \"hookOnly\": true, // strategies\n    \"true\": true, \"false\": true, // deprecated booleans\n}\n\nfunc validateWaitInput(s string) error {\n    if !validWaitInputs[s] {\n        return fmt.Errorf(\"invalid wait input %q; want watcher, legacy, or hookOnly\", s)\n    }\n    return nil\n}","typeGuard":"func isWaitStrategy(s string) bool {\n    switch s {\n    case \"watcher\", \"legacy\", \"hookOnly\":\n        return true\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Values are case-sensitive: always lowercase (watcher/legacy/hookOnly)","Migrate Helm 3 scripts from --wait=true to --wait=watcher before the boolean forms are removed","Prefer bare `--wait` (defaults to watcher) in interactive use"],"tags":["cli","flags","kubernetes","migration","helm-4"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}