{"record":{"id":"43467051870db5bc","repo":"tinyhumansai/openhuman","slug":"missing-value-for-flag","errorCode":null,"errorMessage":"missing value for {flag}","messagePattern":"missing value for (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/core/memory_cli.rs","lineNumber":450,"sourceCode":"        eprintln!(\"[memory:cli] namespace '{namespace}' cleared\");\n        Ok::<_, anyhow::Error>(())\n    })?;\n\n    Ok(())\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfn is_help(s: &str) -> bool {\n    matches!(s, \"-h\" | \"--help\" | \"help\")\n}\n\nfn next_arg(args: &[String], i: &mut usize, flag: &str) -> Result<String> {\n    let value = args\n        .get(*i + 1)\n        .ok_or_else(|| anyhow::anyhow!(\"missing value for {flag}\"))?\n        .clone();\n    *i += 2;\n    Ok(value)\n}\n\nfn read_input(path: &str) -> Result<String> {\n    if path == \"-\" {\n        let mut buf = String::new();\n        std::io::stdin().read_to_string(&mut buf)?;\n        Ok(buf)\n    } else {\n        let path = PathBuf::from(path);\n        if !path.exists() {\n            return Err(anyhow::anyhow!(\"file not found: {}\", path.display()));\n        }\n        Ok(std::fs::read_to_string(&path)?)\n    }\n}","sourceCodeStart":432,"sourceCodeEnd":468,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/memory_cli.rs#L432-L468","documentation":"Error \"missing value for {flag}\" thrown in tinyhumansai/openhuman.","triggerScenarios":"Thrown at src/core/memory_cli.rs:450 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}