Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix(output): Prevent color bleeding in child process output
Maximilian Roose94e38d68e2e
diff --git a/src/output/handlers.rs b/src/output/handlers.rsindex 6e234866f..e8bbd080e 100644--- a/src/output/handlers.rs+++ b/src/output/handlers.rs@@ -161,16 +161,40 @@ pub(crate) fn execute_streaming(/// Merges stdout into stderr using shell redirection (1>&2) to ensure deterministic output ordering./// Per CLAUDE.md guidelines: child process output goes to stderr, worktrunk output goes to stdout.///+/// ## Color Bleeding Prevention+///+/// This function explicitly resets ANSI codes on stderr before executing child commands.+///+/// Root cause: Terminal emulators maintain a single rendering state machine. When stdout+/// and stderr both connect to the same TTY, output from both streams passes through this+/// state machine in arrival order. If stdout writes color codes but stderr's output arrives+/// next, the terminal applies stdout's color state to stderr's text. The flush ensures stdout+/// completes, but doesn't reset the terminal state - hence this explicit reset to stderr.+///+/// We write the reset to stderr (not stdout) because:+/// 1. Child process output goes to stderr (per CLAUDE.md guidelines)+/// 2. The reset must reach the terminal before child output+/// 3. Writing to stdout could arrive after stderr due to buffering+////// Calls terminate_output() after completion to handle mode-specific cleanup/// (NUL terminator in directive mode, no-op in interactive mode).pub fn execute_command_in_worktree(worktree_path: &std::path::Path,command: &str,) -> Result<(), GitError> {+ use std::io::Write;+ use worktrunk::styling::{eprint, stderr};+// Flush stdout before executing command to ensure all our messages appear// before the child process outputsuper::flush()?;+ // Reset ANSI codes on stderr to prevent color bleeding (see function docs for details)+ // This fixes color bleeding observed when worktrunk prints colored output to stdout+ // followed immediately by child process output to stderr (e.g., pre-commit run output).+ eprint!("{}", anstyle::Reset);+ stderr().flush().ok(); // Ignore flush errors - reset is best-effort, command execution should proceed+// Execute with stdoutβstderr redirect for deterministic ordering// Convert io::Error to GitError::CommandFailed to preserve error message formattingexecute_streaming(command, worktree_path, true)diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snapindex 103acde8f..5be8f6e57 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap@@ -4,12 +4,12 @@ expression: output.normalized().as_ref()---π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mRunning pre-merge: [1mformat[0m[0m-[40m [0m [1m[34mecho [32m'β Code formatting check passed'+[0m[40m [0m [1m[34mecho [32m'β Code formatting check passed'β Code formatting check passedπ [36mRunning pre-merge: [1mtest[0m[0m-[40m [0m [1m[34mecho [32m'β Test suite failed: 3 tests failing' [36m&& [1m[34mexit 1+[0m[40m [0m [1m[34mecho [32m'β Test suite failed: 3 tests failing' [36m&& [1m[34mexit 1β Test suite failed: 3 tests failingβ [31mPre-merge command failed: [1m[31mtest[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snapindex bc3440deb..3b38b580b 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap@@ -4,11 +4,11 @@ expression: output.normalized().as_ref()---π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mRunning pre-merge: [1mformat[0m[0m-[40m [0m [1m[34mecho [32m'β Code formatting check passed'+[0m[40m [0m [1m[34mecho [32m'β Code formatting check passed'β Code formatting check passedπ [36mRunning pre-merge: [1mtest[0m[0m-[40m [0m [1m[34mecho [32m'β Test suite failed: 3 tests failing' [36m&& [1m[34mexit 1+[0m[40m [0m [1m[34mecho [32m'β Test suite failed: 3 tests failing' [36m&& [1m[34mexit 1β Test suite failed: 3 tests failingβ [31mPre-merge command failed: [1m[31mtest[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snapindex 07373c5c9..037396430 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap@@ -2,8 +2,8 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized().as_ref()----β Code formatting check passed-β Test suite failed: 3 tests failing+[0mβ Code formatting check passed+[0mβ Test suite failed: 3 tests failingβ [31mPre-merge command failed: [1m[31mtest[0m[0mCommand failed with exit code: exit status: 1diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snapindex a4b7cf9ee..046694aff 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap@@ -4,17 +4,17 @@ expression: output.normalized().as_ref()---π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mRunning pre-merge: [1mformat[0m[0m-[40m [0m [1m[34mecho [32m'β Code formatting check passed'+[0m[40m [0m [1m[34mecho [32m'β Code formatting check passed'β Code formatting check passedπ [36mRunning pre-merge: [1mlint[0m[0m-[40m [0m [1m[34mecho [32m'β Linting passed - no warnings'+[0m[40m [0m [1m[34mecho [32m'β Linting passed - no warnings'β Linting passed - no warningsπ [36mRunning pre-merge: [1mtest[0m[0m-[40m [0m [1m[34mecho [32m'β All 47 tests passed in 2.3s'+[0m[40m [0m [1m[34mecho [32m'β All 47 tests passed in 2.3s'β All 47 tests passed in 2.3sdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snapindex df5dbd171..4f27768b7 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap@@ -4,15 +4,15 @@ expression: output.normalized().as_ref()---π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mRunning pre-merge: [1mformat[0m[0m-[40m [0m [1m[34mecho [32m'β Code formatting check passed'+[0m[40m [0m [1m[34mecho [32m'β Code formatting check passed'β Code formatting check passedπ [36mRunning pre-merge: [1mlint[0m[0m-[40m [0m [1m[34mecho [32m'β Linting passed - no warnings'+[0m[40m [0m [1m[34mecho [32m'β Linting passed - no warnings'β Linting passed - no warningsπ [36mRunning pre-merge: [1mtest[0m[0m-[40m [0m [1m[34mecho [32m'β All 47 tests passed in 2.3s'+[0m[40m [0m [1m[34mecho [32m'β All 47 tests passed in 2.3s'β All 47 tests passed in 2.3sπ [36mMerging 1 commit to [1m[36mmain[0m[0m @ [2md067f01[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snapindex c1c60b7bc..c88d3d0ba 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap@@ -2,9 +2,9 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized().as_ref()----β Code formatting check passed-β Linting passed - no warnings-β All 47 tests passed in 2.3s+[0mβ Code formatting check passed+[0mβ Linting passed - no warnings+[0mβ All 47 tests passed in 2.3sπ [36mRebasing onto [1m[36mmain[0m...[0mπ [36mRunning pre-merge: [1mformat[0m[0m[40m [0m [1m[34mecho [32m'β Code formatting check passed'diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snapindex ecc91e3a9..ca3a105f4 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap@@ -3,12 +3,12 @@ source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized().as_ref()---π [36mRunning post-create: [1m1[0m[0m-[40m [0m [1m[34mecho [32m'Installing dependencies...'+[0m[40m [0m [1m[34mecho [32m'Installing dependencies...'Installing dependencies...π [36mRunning post-create: [1m2[0m[0m-[40m [0m [1m[34mecho [32m'Building project...'+[0m[40m [0m [1m[34mecho [32m'Building project...'Building project...diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snapindex 10e75f563..0c205e8cb 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap@@ -2,8 +2,8 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized().as_ref()----Installing dependencies...-Building project...+[0mInstalling dependencies...+[0mBuilding project...π [36mRunning post-create: [1m1[0m[0m[40m [0m [1m[34mecho [32m'Installing dependencies...'diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snapindex 76808bb1f..89a48fec4 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpwgLxRb/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpT1f9Hm/test-config.toml---success: trueexit_code: 0@@ -39,3 +40,4 @@ exit_code: 0π‘ [33mCommand failed: Command failed with exit code: exit status: 1[0m----- stderr -----+[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snapindex fe198c04a..0f16842c1 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpc1lOt8/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpZxZQF9/test-config.toml---success: trueexit_code: 0@@ -42,3 +41,4 @@ exit_code: 0----- stderr -----+[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snapindex 81ab8ded3..5a74bd447 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpGDHgpq/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpLb4vMz/test-config.toml---success: trueexit_code: 0@@ -38,3 +39,4 @@ exit_code: 0----- stderr -----+[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snapindex daacce5d4..00fda5fea 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpKlfwQ3/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxdVWsm/test-config.toml---success: falseexit_code: 1@@ -27,7 +26,7 @@ exit_code: 1----- stderr ------β [31mPre-commit command failed[0m+[0mβ [31mPre-commit command failed[0mCommand failed with exit code: exit status: 1diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snapindex 2c73d8de2..f0faa2dea 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpK99WuG/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6AjptB/test-config.toml---success: trueexit_code: 0@@ -45,4 +44,4 @@ exit_code: 0β [32mReturned to primary at [2m[REPO][0m[0m----- stderr ------Pre-commit check passed+[0mPre-commit check passeddiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snapindex df8a78524..49fbc83ba 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap@@ -7,12 +7,12 @@ Exit code: 0π [36mRunning pre-merge: [1mfirst[0m[0m[40m [0m [1m[34mecho [32m'STDOUT-FROM-FIRST' [36m&& [1m[34mecho [32m'STDERR-FROM-FIRST' >&2-STDOUT-FROM-FIRST+[0mSTDOUT-FROM-FIRSTSTDERR-FROM-FIRSTπ [36mRunning pre-merge: [1msecond[0m[0m[40m [0m [1m[34mecho [32m'STDOUT-FROM-SECOND' [36m&& [1m[34mecho [32m'STDERR-FROM-SECOND' >&2-STDOUT-FROM-SECOND+[0mSTDOUT-FROM-SECONDSTDERR-FROM-SECONDπ [36mMerging 1 commit to [1m[36mmain[0m[0m @ [SHA]diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snapindex a2462342e..25f16d221 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1a9gRi/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpHN1Gsh/test-config.toml---success: falseexit_code: 1@@ -28,7 +28,7 @@ exit_code: 1----- stderr ------β [31mPre-merge command failed[0m+[0mβ [31mPre-merge command failed[0mCommand failed with exit code: exit status: 1diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snapindex be9083c4e..eb4ac233d 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpM0B2Vk/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp93EEWp/test-config.toml---success: trueexit_code: 0@@ -45,3 +44,4 @@ exit_code: 0β [32mReturned to primary at [2m[REPO][0m[0m----- stderr -----+[0m[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snapindex f15779039..060a88bf3 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeOO9yg/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpMGhwKV/test-config.toml---success: trueexit_code: 0@@ -42,7 +41,7 @@ exit_code: 0β [32mReturned to primary at [2m[REPO][0m[0m----- stderr ------[check1] stdout line 1+[0m[check1] stdout line 1[check1] stderr line 1[check1] stdout line 2[check1] stderr line 2@@ -50,7 +49,7 @@ exit_code: 0[check1] stderr line 3[check1] stdout complete[check1] stderr complete-[check2] stdout line 1+[0m[check2] stdout line 1[check2] stderr line 1[check2] stdout line 2[check2] stderr line 2diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snapindex bc6be23bd..9bb91b1d9 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp7PVXx8/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp7YAl9h/test-config.toml---success: trueexit_code: 0@@ -39,3 +39,4 @@ exit_code: 0β [32mReturned to primary at [2m[REPO][0m[0m----- stderr -----+[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snapindex a2ddf0730..ada775d01 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap@@ -14,11 +14,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp2L2QHX/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxrSB06/test-config.toml---success: falseexit_code: 1@@ -28,7 +27,7 @@ exit_code: 1----- stderr ------β [31mPre-squash command failed[0m+[0mβ [31mPre-squash command failed[0mCommand failed with exit code: exit status: 1diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snapindex 17239afb6..4c0eee709 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap@@ -14,11 +14,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptB95SO/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpMTUIaI/test-config.toml---success: trueexit_code: 0@@ -41,4 +40,4 @@ exit_code: 0β [32mReturned to primary at [2m[REPO][0m[0m----- stderr ------Pre-squash check passed+[0mPre-squash check passeddiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snapindex 501b7dbbf..f74a8cb52 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1gm53W/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpIy4Px6/test-config.toml---success: trueexit_code: 0@@ -33,3 +32,4 @@ exit_code: 0To enable automatic cd, run: wt config shell----- stderr -----+[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snapindex 6c800f460..999f3754e 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp52uf4X/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRK6T43/test-config.toml---success: trueexit_code: 0@@ -30,3 +31,4 @@ exit_code: 0To enable automatic cd, run: wt config shell----- stderr -----+[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snapindex ab2556f7f..37522873c 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpslS57M/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpzoaI0i/test-config.toml---success: trueexit_code: 0@@ -33,3 +34,4 @@ exit_code: 0To enable automatic cd, run: wt config shell----- stderr -----+[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snapindex 64fa9006c..cfabdc0dc 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpMyvnDw/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXehuWN/test-config.toml---success: trueexit_code: 0@@ -33,5 +32,5 @@ exit_code: 0To enable automatic cd, run: wt config shell----- stderr ------First-Second+[0mFirst+[0mSeconddiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snapindex 572caa99a..7621df4c8 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0mBOY1/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5PFAxf/test-config.toml---success: trueexit_code: 0@@ -33,5 +32,5 @@ exit_code: 0To enable automatic cd, run: wt config shell----- stderr ------Installing deps-Running setup+[0mInstalling deps+[0mRunning setupdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snapindex 4d625614d..5a73742bf 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpth1Wjx/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpD6afT9/test-config.toml---success: trueexit_code: 0@@ -29,4 +30,4 @@ exit_code: 0To enable automatic cd, run: wt config shell----- stderr ------Setup complete+[0mSetup completediff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snapindex 696c197c0..4233b4ab7 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap@@ -13,11 +13,10 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNSkMrr/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbNTa9s/test-config.toml---success: trueexit_code: 0@@ -39,3 +38,4 @@ exit_code: 0To enable automatic cd, run: wt config shell----- stderr -----+[0m[0m[0m[0m