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
|
// Check if this is a binary item and we're outputting to a TTY
|
||||||
if !args.options.force {
|
if !args.options.force {
|
||||||
if let Some(binary_meta) = item.meta.get("binary") {
|
let item_meta = crate::db::get_item_meta(conn, &item)?;
|
||||||
if binary_meta == "true" {
|
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() {
|
if is_stdout_tty() {
|
||||||
return Err(anyhow!("Refusing to output binary data to TTY, use --force to override"));
|
return Err(anyhow!("Refusing to output binary data to TTY, use --force to override"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user