From af614dbb72193be46a9c5c4367b17142c98ef857 Mon Sep 17 00:00:00 2001 From: Kalvin Chau Date: Wed, 19 Feb 2025 10:47:18 -0800 Subject: [PATCH] fix: use in_state_dir to match logs directory with fallback --- crates/goose-cli/src/commands/info.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/goose-cli/src/commands/info.rs b/crates/goose-cli/src/commands/info.rs index fa62ff3a6..d745abfaf 100644 --- a/crates/goose-cli/src/commands/info.rs +++ b/crates/goose-cli/src/commands/info.rs @@ -10,7 +10,9 @@ fn print_aligned(label: &str, value: &str, width: usize) { pub fn handle_info(verbose: bool) -> Result<()> { let data_dir = choose_app_strategy(crate::APP_STRATEGY.clone())?; - let logs_dir = data_dir.in_data_dir("logs"); + let logs_dir = data_dir + .in_state_dir("logs") + .unwrap_or_else(|| data_dir.in_data_dir("logs")); let sessions_dir = data_dir.in_data_dir("sessions"); // Get paths using a stored reference to the global config