diff --git a/crates/goose/Cargo.toml b/crates/goose/Cargo.toml index 2f47c9b15a..1d837aec4b 100644 --- a/crates/goose/Cargo.toml +++ b/crates/goose/Cargo.toml @@ -41,6 +41,7 @@ xcap = "0.0.14" libc = "=0.2.164" keyring = { version = "3.6.1", features = ["apple-native", "windows-native", "sync-secret-service"] } +shellexpand = "3.1.0" [dev-dependencies] wiremock = "0.6.0" diff --git a/crates/goose/src/developer.rs b/crates/goose/src/developer.rs index b622e107c8..f090790d65 100644 --- a/crates/goose/src/developer.rs +++ b/crates/goose/src/developer.rs @@ -158,7 +158,8 @@ impl DeveloperSystem { // Helper method to resolve a path relative to cwd fn resolve_path(&self, path_str: &str) -> AgentResult { let cwd = self.cwd.lock().unwrap(); - let path = Path::new(path_str); + let expanded = shellexpand::tilde(path_str); + let path = Path::new(expanded.as_ref()); let resolved_path = if path.is_absolute() { path.to_path_buf() } else {