From 3ecacfddae86d603bfd0d1a0c01602b1d34b1df3 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 17 May 2026 01:41:17 +0300 Subject: feat: add direct terminal attach stream --- src/workspace.rs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/workspace.rs') diff --git a/src/workspace.rs b/src/workspace.rs index 553206c4..1d8842c8 100644 --- a/src/workspace.rs +++ b/src/workspace.rs @@ -720,15 +720,25 @@ mod tests { #[test] fn workspace_identity_uses_identity_cwd() { + let root = std::env::temp_dir().join(format!( + "herdr-workspace-identity-{}-{}", + std::process::id(), + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_nanos() + )); + let identity_cwd = root.join("pion"); + std::fs::create_dir_all(identity_cwd.join(".git")).unwrap(); + let mut ws = Workspace::test_new("ignored"); ws.custom_name = None; - ws.identity_cwd = PathBuf::from("/herdr-test/pion"); + ws.identity_cwd = identity_cwd.clone(); assert_eq!(ws.display_name(), "pion"); - assert_eq!( - ws.resolved_identity_cwd(), - Some(PathBuf::from("/herdr-test/pion")) - ); + assert_eq!(ws.resolved_identity_cwd(), Some(identity_cwd)); + + std::fs::remove_dir_all(root).unwrap(); } #[test] -- cgit v1.2.3