{"record":{"id":"11fa89be12090bfe","repo":"matryer/xbar","slug":"terminal","errorCode":null,"errorMessage":"terminal","messagePattern":"terminal","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/plugins/item_params.go","lineNumber":213,"sourceCode":"\tcase \"font\":\n\t\tp.Font = value\n\tcase \"size\":\n\t\tval, err := parseInt(value)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}\n\t\tp.Size = val\n\tcase \"shell\", \"bash\":\n\t\tp.Shell = value\n\tcase \"templateImage\":\n\t\tp.TemplateImage = value\n\tcase \"image\":\n\t\tp.Image = value\n\tcase \"terminal\":\n\t\tvar err error\n\t\tp.Terminal, err = parseBool(value)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}\n\tcase \"refresh\":\n\t\tvar err error\n\t\tp.Refresh, err = parseBool(value)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}\n\tcase \"dropdown\":\n\t\tvar err error\n\t\tp.Dropdown, err = parseBool(value)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}\n\tcase \"length\":\n\t\tval, err := parseInt(value)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/matryer/xbar/blob/d624239058997c80118eaebe2e7f8331b3c765e0/pkg/plugins/item_params.go#L195-L231","documentation":"Returned by ItemParams.setValueByKey when the 'terminal' parameter value cannot be parsed as a boolean by parseBool; the error is wrapped with the key name ('terminal: ...'). This occurs while parsing plugin item parameters that control whether an item runs in a terminal.","triggerScenarios":"parseParamStr encounters key 'terminal' with a non-boolean value — e.g. terminal=True (capital T if parser is strict), terminal=yes, terminal=on, or terminal= with empty value.","commonSituations":"Configs written with YAML-style booleans (yes/no/on/off/True/False) instead of lowercase true/false; quotes or whitespace around the value from manual editing.","solutions":["Use lowercase true/false: terminal=true or terminal=false.","Trim whitespace and quotes from the value.","Omit the 'terminal' key if the default behavior is desired."],"exampleFix":"// before\nterminal=True\n// after\nterminal=true","handlingStrategy":"validation","validationCode":"func validTerminalParam(key, value string) error {\n    if key == \"terminal\" {\n        v := strings.TrimSpace(value)\n        if v != \"true\" && v != \"false\" {\n            return fmt.Errorf(\"terminal must be true/false, got %q\", value)\n        }\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"params, err := parseParamStr(raw)\nif err != nil && strings.HasPrefix(err.Error(), \"terminal:\") {\n    log.Printf(\"invalid 'terminal' value in %q, defaulting to false\", raw)\n    params.Terminal = false\n}","preventionTips":["Use only lowercase true/false for the terminal param.","Normalize booleans (True→true, yes→true) when migrating configs.","Trim whitespace/quotes from parameter values.","Lint plugin config files for boolean params before deployment."],"tags":["go","parsing","plugin-params","boolean"],"backgroundTag":"invalid-boolean-parameter","analyzedSha":"d624239058997c80118eaebe2e7f8331b3c765e0","analyzedAt":"2026-09-02T22:38:22.007Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}