fix: Use ASCII_FULL for tables when stdout is not a TTY

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-08 18:44:16 -03:00
parent fc7ca8318b
commit b41d710a35

View File

@@ -146,9 +146,13 @@ pub fn create_table(use_styling: bool) -> Table {
table.set_content_arrangement(ContentArrangement::Dynamic); table.set_content_arrangement(ContentArrangement::Dynamic);
if use_styling { if use_styling {
table if std::io::stdout().is_terminal() {
.load_preset(comfy_table::presets::UTF8_FULL) table
.apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS); .load_preset(comfy_table::presets::UTF8_FULL)
.apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS);
} else {
table.load_preset(comfy_table::presets::ASCII_FULL);
}
} else { } else {
table.load_preset(comfy_table::presets::NOTHING); table.load_preset(comfy_table::presets::NOTHING);
} }