{"record":{"id":"daa19bee92c119d4","repo":"GoogleContainerTools/skaffold","slug":"value-must-be-one-of-always-missing-or-neve","errorCode":null,"errorMessage":"value must be one of `always`, `missing`, or `never`","messagePattern":"value must be one of `always`, `missing`, or `never`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/config/remote_cache.go","lineNumber":59,"sourceCode":"type SyncRemoteCacheOption struct {\n\tvalue string\n}\n\nfunc (s *SyncRemoteCacheOption) Type() string {\n\treturn \"string\"\n}\n\nfunc (s *SyncRemoteCacheOption) Value() string {\n\treturn s.value\n}\n\nfunc (s *SyncRemoteCacheOption) Set(v string) error {\n\tswitch v {\n\tcase always, missing, never:\n\t\ts.value = v\n\t\treturn nil\n\tdefault:\n\t\treturn errors.New(\"value must be one of `always`, `missing`, or `never`\")\n\t}\n}\n\nfunc (s *SyncRemoteCacheOption) SetNil() error {\n\ts.value = always\n\treturn nil\n}\n\nfunc (s *SyncRemoteCacheOption) String() string {\n\tif s.value == \"\" {\n\t\treturn always\n\t}\n\treturn s.value\n}\n\n// CloneDisabled specifies if cloning remote dependencies is disabled by flag value\nfunc (s *SyncRemoteCacheOption) CloneDisabled() bool {\n\treturn s.value == never","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/config/remote_cache.go#L41-L77","documentation":"SyncRemoteCacheOption implements pflag's Value interface; its Set method only accepts the literals `always`, `missing`, or `never` (which control remote base-image cache sync behavior). Any other string passed to the corresponding flag fails flag parsing with this error.","triggerScenarios":"Passing an invalid value to the sync remote cache flag, e.g. `--sync-remote-cache=Always`, `true`, `yes`, or a typo like `alway`. Matching is exact lowercase.","commonSituations":"Users assuming boolean semantics and passing `true`/`false`; capitalization mistakes; copying flag values from older skaffold docs with different accepted values.","solutions":["Use one of the exact accepted values: `--sync-remote-cache=always`, `=missing`, or `=never`","Correct casing to lowercase (`Always` -> `always`)","Replace boolean-style values: `true` -> `always`, `false` -> `never`"],"exampleFix":"// before\nskaffold dev --sync-remote-cache=true\n// after\nskaffold dev --sync-remote-cache=always","handlingStrategy":"validation","validationCode":"case \"$SYNC_MODE\" in\n  always|missing|never) ;;\n  *) echo \"SYNC_MODE must be always|missing|never\"; exit 1;;\nesac\nskaffold dev --sync-remote-cache=\"$SYNC_MODE\"","typeGuard":"const valid = ['always', 'missing', 'never'];\nconst isValidSyncRemoteCache = (v) => valid.includes(v);","tryCatchPattern":"if err := opt.Set(v); err != nil {\n  if strings.Contains(err.Error(), \"value must be one of\") {\n    return fmt.Errorf(\"--sync-remote-cache: %q is invalid; use always, missing, or never\", v)\n  }\n  return err\n}","preventionTips":["Only use the exact lowercase literals: always, missing, never","Translate booleans: true -> always, false -> never","Validate flag values in scripts before invoking skaffold"],"tags":["flags","enum-validation","configuration","skaffold"],"backgroundTag":"invalid-enum-value","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}