feat: goose windows (#880)

Co-authored-by: Ryan Versaw <ryan@versaw.com>
This commit is contained in:
Max Novich
2025-02-10 15:05:13 -08:00
committed by GitHub
parent 98aecbef23
commit cfd3ee8fd9
43 changed files with 1327 additions and 456 deletions
+5 -1
View File
@@ -32,7 +32,11 @@ struct TokenCache {
fn get_base_path() -> PathBuf {
const BASE_PATH: &str = ".config/goose/databricks/oauth";
let home_dir = std::env::var("HOME").expect("HOME environment variable not set");
let home_dir = if cfg!(windows) {
std::env::var("USERPROFILE").expect("USERPROFILE environment variable not set")
} else {
std::env::var("HOME").expect("HOME environment variable not set")
};
PathBuf::from(home_dir).join(BASE_PATH)
}