Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix: Use portable shell command in merge tests (#35)

Maximilian Roosb56afbad35df
diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rs
index b067efe52..fc4b8c4f3 100644
--- a/tests/integration_tests/merge.rs
+++ b/tests/integration_tests/merge.rs
@@ -794,11 +794,11 @@ fn test_merge_auto_commit_with_llm() {
.expect("Failed to write file");
// Configure mock LLM command via config file
- // Use /bin/echo to avoid PATH resolution issues in CI environments
+ // Use /usr/bin/printf with explicit path for cross-platform consistency
let worktrunk_config = r#"
[commit-generation]
-command = "/bin/echo"
-args = ["fix: improve auth validation logic"]
+command = "/usr/bin/printf"
+args = ["%s\n", "fix: improve auth validation logic"]
"#;
fs::write(repo.test_config_path(), worktrunk_config).expect("Failed to write worktrunk config");
@@ -820,11 +820,11 @@ fn test_merge_auto_commit_and_squash() {
.expect("Failed to write file");
// Configure mock LLM command via config file
- // Use /bin/echo to avoid PATH resolution issues in CI environments
+ // Use /usr/bin/printf with explicit path for cross-platform consistency
let worktrunk_config = r#"
[commit-generation]
-command = "/bin/echo"
-args = ["fix: update file 1 content"]
+command = "/usr/bin/printf"
+args = ["%s\n", "fix: update file 1 content"]
"#;
fs::write(repo.test_config_path(), worktrunk_config).expect("Failed to write worktrunk config");