From ab7dc4c34fa5feb91f97b90c5bcf10db574cb24b Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Mon, 11 Aug 2025 13:16:45 -0300 Subject: [PATCH] fix: correct metadata access in get mode to use proper DB function Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) --- src/modes/get.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modes/get.rs b/src/modes/get.rs index d3686e4..f07d38a 100644 --- a/src/modes/get.rs +++ b/src/modes/get.rs @@ -45,8 +45,10 @@ pub fn mode_get( // Check if this is a binary item and we're outputting to a TTY if !args.options.force { - if let Some(binary_meta) = item.meta.get("binary") { - if binary_meta == "true" { + let item_meta = crate::db::get_item_meta(conn, &item)?; + let binary_meta = item_meta.into_iter().find(|meta| meta.name == "binary"); + if let Some(binary_meta) = binary_meta { + if binary_meta.value == "true" { if is_stdout_tty() { return Err(anyhow!("Refusing to output binary data to TTY, use --force to override")); }