fix: improve readability of environment variable retrieval in indexing harness

Refactored the environment variable retrieval logic for Windows to enhance clarity by adding additional line breaks. This change maintains the existing functionality while making the code easier to read and understand.
This commit is contained in:
Jamie Pine
2025-12-30 12:08:53 -08:00
parent fee527536c
commit eb8d83df6e

View File

@@ -53,7 +53,9 @@ impl IndexingHarnessBuilder {
// Use home directory for proper filesystem watcher support on macOS
// On Windows, use USERPROFILE; on Unix, use HOME
let home = if cfg!(windows) {
std::env::var("USERPROFILE").unwrap_or_else(|_| std::env::var("TEMP").unwrap_or_else(|_| "C:\\temp".to_string()))
std::env::var("USERPROFILE").unwrap_or_else(|_| {
std::env::var("TEMP").unwrap_or_else(|_| "C:\\temp".to_string())
})
} else {
std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string())
};