fix: correct metadata access in get mode to use proper DB function
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user