Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Clarify worktree path exists error message
Maximilian Roosc766935c1db8
diff --git a/src/git/error.rs b/src/git/error.rsindex 1e54b37b8..c9947662f 100644--- a/src/git/error.rs+++ b/src/git/error.rs@@ -267,7 +267,7 @@ impl std::fmt::Display for GitError {"Directory already exists: <bold>{path_display}</>")),hint_message(cformat!(- "To remove manually, run <bright-black>rm -rf {path_escaped}</>; to retry with backup, run <bright-black>{switch_cmd}</>"+ "To remove manually, run <bright-black>rm -rf {path_escaped}</>; to overwrite (with backup), run <bright-black>{switch_cmd}</>")))}@@ -717,10 +717,10 @@ mod tests {branch: "feature".to_string(),path: PathBuf::from("/some/path"),};- assert_snapshot!(err.to_string(), @r"+ assert_snapshot!(err.to_string(), @"[31m✗[39m [31mDirectory already exists: [1m/some/path[22m[39m- [2m↳[22m [2mTo remove manually, run [90mrm -rf /some/path[39m; to retry with backup, run [90mwt switch feature --clobber[39m[22m+ [2m↳[22m [2mTo remove manually, run [90mrm -rf /some/path[39m; to overwrite (with backup), run [90mwt switch feature --clobber[39m[22m");}diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_exists.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_exists.snapindex 2f8d018e2..9fa8791d5 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_exists.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_exists.snap@@ -4,4 +4,4 @@ expression: err.to_string()---[31m✗[39m [31mDirectory already exists: [1m/tmp/repo.feature[22m[39m-[2m↳[22m [2mTo remove manually, run [90mrm -rf /tmp/repo.feature[39m; to retry with backup, run [90mwt switch feature --clobber[39m[22m+[2m↳[22m [2mTo remove manually, run [90mrm -rf /tmp/repo.feature[39m; to overwrite (with backup), run [90mwt switch feature --clobber[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied.snap b/tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied.snapindex 3095aae31..19b099ac4 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied.snap@@ -33,4 +33,4 @@ exit_code: 1----- stderr -----[31m✗[39m [31mDirectory already exists: [1m_REPO_.occupied-branch[22m[39m-[2m↳[22m [2mTo remove manually, run [90mrm -rf _REPO_.occupied-branch[39m; to retry with backup, run [90mwt switch occupied-branch --clobber[39m[22m+[2m↳[22m [2mTo remove manually, run [90mrm -rf _REPO_.occupied-branch[39m; to overwrite (with backup), run [90mwt switch occupied-branch --clobber[39m[22m