{"record":{"id":"1ce47bb8c3766c49","repo":"chenhg5/cc-connect","slug":"video-requires-a-path","errorCode":null,"errorMessage":"--video requires a path","messagePattern":"--video requires a path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cc-connect/send.go","lineNumber":133,"sourceCode":"\t\t\t\treturn req, \"\", fmt.Errorf(\"--image requires a path\")\n\t\t\t}\n\t\t\ti++\n\t\t\timagePaths = append(imagePaths, args[i])\n\t\tcase \"--file\":\n\t\t\tif i+1 >= len(args) {\n\t\t\t\treturn req, \"\", fmt.Errorf(\"--file requires a path\")\n\t\t\t}\n\t\t\ti++\n\t\t\tfilePaths = append(filePaths, args[i])\n\t\tcase \"--audio\":\n\t\t\tif i+1 >= len(args) {\n\t\t\t\treturn req, \"\", fmt.Errorf(\"--audio requires a path\")\n\t\t\t}\n\t\t\ti++\n\t\t\taudioPaths = append(audioPaths, args[i])\n\t\tcase \"--video\":\n\t\t\tif i+1 >= len(args) {\n\t\t\t\treturn req, \"\", fmt.Errorf(\"--video requires a path\")\n\t\t\t}\n\t\t\ti++\n\t\t\tvideoPaths = append(videoPaths, args[i])\n\t\tcase \"--stdin\":\n\t\t\tuseStdin = true\n\t\tcase \"--at-users\":\n\t\t\tif i+1 >= len(args) {\n\t\t\t\treturn req, \"\", fmt.Errorf(\"--at-users requires a value\")\n\t\t\t}\n\t\t\ti++\n\t\t\tfor _, uid := range strings.Split(args[i], \",\") {\n\t\t\t\tuid = strings.TrimSpace(uid)\n\t\t\t\tif uid != \"\" {\n\t\t\t\t\treq.AtUsers = append(req.AtUsers, uid)\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"--at-all\":\n\t\t\treq.AtAll = true","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/cmd/cc-connect/send.go#L115-L151","documentation":"The --video flag of `cc-connect send` requires a path argument. parseSendArgs returns \"--video requires a path\" when the flag is last or is followed by another flag. Validation happens in the parser, before the file is loaded or sent.","triggerScenarios":"`cc-connect send --video` with no trailing path; `cc-connect send --video --stdin`; the video filename consumed by a different flag due to argument ordering mistakes.","commonSituations":"Screen-recording step produced no file so the variable is empty; command built from a config where the video path key was missing; quoting mangled when copying commands between shells.","solutions":["Provide the path: `--video ./clip.mp4`.","Quote paths containing spaces.","Validate the file exists (and variable non-empty) before invoking cc-connect.","Repeat --video per file."],"exampleFix":"// before\ncc-connect send --video\n// after\ncc-connect send --video ./clips/demo.mp4","handlingStrategy":"validation","validationCode":"V=./demo.mp4\n[ -n \"$V\" ] || { echo \"video path empty\"; exit 1; }\ncc-connect send --video \"$V\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Place the path immediately after --video.","Confirm the recording pipeline produced the file.","Quote paths with spaces.","Check argument order when combining many flags."],"tags":["cli","attachments","argument-parsing"],"backgroundTag":"missing-required-flag","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}