Skip to content

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.rs
index 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 output
super::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 formatting
execute_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.snap
index 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()
---
πŸ”„ Rebasing onto main...
πŸ”„ Running pre-merge: format
-  echo 'βœ“ Code formatting check passed'
+  echo 'βœ“ Code formatting check passed'
βœ“ Code formatting check passed
πŸ”„ Running pre-merge: test
-  echo 'βœ— Test suite failed: 3 tests failing' && exit 1
+  echo 'βœ— Test suite failed: 3 tests failing' && exit 1
βœ— Test suite failed: 3 tests failing
❌ Pre-merge command failed: test
diff --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.snap
index 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()
---
πŸ”„ Rebasing onto main...
πŸ”„ Running pre-merge: format
-  echo 'βœ“ Code formatting check passed'
+  echo 'βœ“ Code formatting check passed'
βœ“ Code formatting check passed
πŸ”„ Running pre-merge: test
-  echo 'βœ— Test suite failed: 3 tests failing' && exit 1
+  echo 'βœ— Test suite failed: 3 tests failing' && exit 1
βœ— Test suite failed: 3 tests failing
❌ Pre-merge command failed: test
diff --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.snap
index 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.rs
expression: output.normalized().as_ref()
---
-βœ“ Code formatting check passed
-βœ— Test suite failed: 3 tests failing
+βœ“ Code formatting check passed
+βœ— Test suite failed: 3 tests failing
❌ Pre-merge command failed: test
Command failed with exit code: exit status: 1
diff --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.snap
index 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()
---
πŸ”„ Rebasing onto main...
πŸ”„ Running pre-merge: format
-  echo 'βœ“ Code formatting check passed'
+  echo 'βœ“ Code formatting check passed'
βœ“ Code formatting check passed
πŸ”„ Running pre-merge: lint
-  echo 'βœ“ Linting passed - no warnings'
+  echo 'βœ“ Linting passed - no warnings'
βœ“ Linting passed - no warnings
πŸ”„ Running pre-merge: test
-  echo 'βœ“ All 47 tests passed in 2.3s'
+  echo 'βœ“ All 47 tests passed in 2.3s'
βœ“ All 47 tests passed in 2.3s
diff --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.snap
index 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()
---
πŸ”„ Rebasing onto main...
πŸ”„ Running pre-merge: format
-  echo 'βœ“ Code formatting check passed'
+  echo 'βœ“ Code formatting check passed'
βœ“ Code formatting check passed
πŸ”„ Running pre-merge: lint
-  echo 'βœ“ Linting passed - no warnings'
+  echo 'βœ“ Linting passed - no warnings'
βœ“ Linting passed - no warnings
πŸ”„ Running pre-merge: test
-  echo 'βœ“ All 47 tests passed in 2.3s'
+  echo 'βœ“ All 47 tests passed in 2.3s'
βœ“ All 47 tests passed in 2.3s
πŸ”„ Merging 1 commit to main @ d067f01
diff --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.snap
index 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.rs
expression: output.normalized().as_ref()
---
-βœ“ Code formatting check passed
-βœ“ Linting passed - no warnings
-βœ“ All 47 tests passed in 2.3s
+βœ“ Code formatting check passed
+βœ“ Linting passed - no warnings
+βœ“ All 47 tests passed in 2.3s
πŸ”„ Rebasing onto main...
πŸ”„ Running pre-merge: format
  echo 'βœ“ 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.snap
index 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.rs
expression: output.normalized().as_ref()
---
πŸ”„ Running post-create: 1
-  echo 'Installing dependencies...'
+  echo 'Installing dependencies...'
Installing dependencies...
πŸ”„ Running post-create: 2
-  echo 'Building project...'
+  echo '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.snap
index 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.rs
expression: output.normalized().as_ref()
---
-Installing dependencies...
-Building project...
+Installing dependencies...
+Building project...
πŸ”„ Running post-create: 1
  echo '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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -39,3 +40,4 @@ exit_code: 0
🟑 Command failed: Command failed with exit code: exit status: 1
----- stderr -----
+
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -42,3 +41,4 @@ exit_code: 0
----- stderr -----
+
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -38,3 +39,4 @@ exit_code: 0
----- stderr -----
+
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: false
exit_code: 1
@@ -27,7 +26,7 @@ exit_code: 1
----- stderr -----
-❌ Pre-commit command failed
+❌ Pre-commit command failed
Command failed with exit code: exit status: 1
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -45,4 +44,4 @@ exit_code: 0
βœ… Returned to primary at [REPO]
----- stderr -----
-Pre-commit check passed
+Pre-commit check passed
diff --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.snap
index 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
πŸ”„ Running pre-merge: first
  echo 'STDOUT-FROM-FIRST' && echo 'STDERR-FROM-FIRST' >&2
-STDOUT-FROM-FIRST
+STDOUT-FROM-FIRST
STDERR-FROM-FIRST
πŸ”„ Running pre-merge: second
  echo 'STDOUT-FROM-SECOND' && echo 'STDERR-FROM-SECOND' >&2
-STDOUT-FROM-SECOND
+STDOUT-FROM-SECOND
STDERR-FROM-SECOND
πŸ”„ Merging 1 commit to main @ [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.snap
index 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: C
LC_ALL: C
SOURCE_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: false
exit_code: 1
@@ -28,7 +28,7 @@ exit_code: 1
----- stderr -----
-❌ Pre-merge command failed
+❌ Pre-merge command failed
Command failed with exit code: exit status: 1
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -45,3 +44,4 @@ exit_code: 0
βœ… Returned to primary at [REPO]
----- stderr -----
+
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -42,7 +41,7 @@ exit_code: 0
βœ… Returned to primary at [REPO]
----- stderr -----
-[check1] stdout line 1
+[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
+[check2] stdout line 1
[check2] stderr line 1
[check2] stdout line 2
[check2] stderr line 2
diff --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.snap
index 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: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -39,3 +39,4 @@ exit_code: 0
βœ… Returned to primary at [REPO]
----- stderr -----
+
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: false
exit_code: 1
@@ -28,7 +27,7 @@ exit_code: 1
----- stderr -----
-❌ Pre-squash command failed
+❌ Pre-squash command failed
Command failed with exit code: exit status: 1
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -41,4 +40,4 @@ exit_code: 0
βœ… Returned to primary at [REPO]
----- stderr -----
-Pre-squash check passed
+Pre-squash check passed
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -33,3 +32,4 @@ exit_code: 0
To enable automatic cd, run: wt config shell
----- stderr -----
+
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -30,3 +31,4 @@ exit_code: 0
To enable automatic cd, run: wt config shell
----- stderr -----
+
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -33,3 +34,4 @@ exit_code: 0
To enable automatic cd, run: wt config shell
----- stderr -----
+
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -33,5 +32,5 @@ exit_code: 0
To enable automatic cd, run: wt config shell
----- stderr -----
-First
-Second
+First
+Second
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -33,5 +32,5 @@ exit_code: 0
To enable automatic cd, run: wt config shell
----- stderr -----
-Installing deps
-Running setup
+Installing deps
+Running setup
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -29,4 +30,4 @@ exit_code: 0
To enable automatic cd, run: wt config shell
----- stderr -----
-Setup complete
+Setup complete
diff --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.snap
index 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/null
GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
LANG: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
@@ -39,3 +38,4 @@ exit_code: 0
To enable automatic cd, run: wt config shell
----- stderr -----
+