mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
fix: expand tilde in paths
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -158,7 +158,8 @@ impl DeveloperSystem {
|
||||
// Helper method to resolve a path relative to cwd
|
||||
fn resolve_path(&self, path_str: &str) -> AgentResult<PathBuf> {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user