{"record":{"id":"bea91675adc8ad65","repo":"charmbracelet/vhs","slug":"expected-boolean-value","errorCode":null,"errorMessage":"expected boolean value.","messagePattern":"expected boolean value\\.","errorType":"validation","errorClass":"parser.Error","httpStatus":null,"severity":"error","filePath":"parser/parser.go","lineNumber":523,"sourceCode":"\n\t\t\tif err != nil || len(marginFill) != 7 {\n\t\t\t\tp.errors = append(\n\t\t\t\t\tp.errors,\n\t\t\t\t\tNewError(\n\t\t\t\t\t\tp.cur,\n\t\t\t\t\t\t\"\\\"\"+marginFill+\"\\\" is not a valid color.\",\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\tcase token.CURSOR_BLINK:\n\t\tcmd.Args = p.peek.Literal\n\t\tp.nextToken()\n\n\t\tif p.cur.Type != token.BOOLEAN {\n\t\t\tp.errors = append(\n\t\t\t\tp.errors,\n\t\t\t\tNewError(p.cur, \"expected boolean value.\"),\n\t\t\t)\n\t\t}\n\n\tdefault:\n\t\tcmd.Args = p.peek.Literal\n\t\tp.nextToken()\n\t}\n\n\treturn cmd\n}\n\n// parseSleep parses a sleep command.\n// A sleep command takes a time for how long to sleep.\n//\n//\tSleep <time>\nfunc (p *Parser) parseSleep() Command {\n\tcmd := Command{Type: token.SLEEP}\n\tcmd.Args = p.parseTime()","sourceCodeStart":505,"sourceCodeEnd":541,"githubUrl":"https://github.com/charmbracelet/vhs/blob/c073383b5de0b1f57bf514113029c306bc986539/parser/parser.go#L505-L541","documentation":"Fires in parseSet when the value given for the CursorBlink setting is not a BOOLEAN token. The parser only accepts true or false; any other literal (e.g. 1, yes, on) triggers the error while the value is still stored in cmd.Args.","triggerScenarios":"Thrown at parser/parser.go:523 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use true or false, e.g. Set CursorBlink false","Replace numeric or textual truthy values like 1 or yes with true/false"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c073383b5de0b1f57bf514113029c306bc986539","analyzedAt":"2026-09-02T01:53:05.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}