Skip to content

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

fix: use info message for migration file write notification (#1078)

Maximilian Roos8e4b303464f2
diff --git a/src/config/deprecation.rs b/src/config/deprecation.rs
index f8940fd16..566e4efb4 100644
--- a/src/config/deprecation.rs
+++ b/src/config/deprecation.rs
@@ -647,8 +647,8 @@ pub fn check_and_migrate(
eprintln!(
"{}",
- hint_message(cformat!(
- "Wrote migrated <bright-black>{new_filename}</>. To apply:"
+ info_message(cformat!(
+ "Wrote migrated <bold>{new_filename}</>. To apply:"
))
);
eprintln!(
@@ -829,8 +829,8 @@ pub fn format_deprecation_details(info: &DeprecationInfo) -> String {
let _ = writeln!(
out,
"{}",
- hint_message(cformat!(
- "Wrote migrated <bright-black>{new_filename}</>. To apply:"
+ info_message(cformat!(
+ "Wrote migrated <bold>{new_filename}</>. To apply:"
))
);
let _ = writeln!(
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
index b71008882..ed638c352 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
@@ -46,7 +46,7 @@ exit_code: 0
PROJECT CONFIG _REPO_/.config/wt.toml
▲ Project config uses deprecated template variables: main_worktree → repo
-↳ Wrote migrated wt.toml.new. To apply:
+○ Wrote migrated wt.toml.new. To apply:
  mv -- _REPO_/.config/wt.toml.new _REPO_/.config/wt.toml
○ Diff:
  diff --git a_REPO_/.config/wt.toml b_REPO_/.config/wt.toml.new
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
index a80eaf3db..709111775 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
@@ -43,7 +43,7 @@ exit_code: 0
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
▲ User config uses deprecated template variables: repo_root → repo_path, main_worktree → repo
-↳ Wrote migrated config.toml.new. To apply:
+○ Wrote migrated config.toml.new. To apply:
  mv -- [TEMP_HOME]/.config/worktrunk/config.toml.new [TEMP_HOME]/.config/worktrunk/config.toml
○ Diff:
  diff --git a[TEMP_HOME]/.config/worktrunk/config.toml b[TEMP_HOME]/.config/worktrunk/config.toml.new
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
index 82f712400..3ad78a7d2 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
@@ -43,7 +43,7 @@ exit_code: 0
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
▲ User config uses deprecated config sections: [projects."github.com/example/repo".commit-generation] → [projects."github.com/example/repo".commit.generation]
-↳ Wrote migrated config.toml.new. To apply:
+○ Wrote migrated config.toml.new. To apply:
  mv -- [TEMP_HOME]/.config/worktrunk/config.toml.new [TEMP_HOME]/.config/worktrunk/config.toml
○ Diff:
  diff --git a[TEMP_HOME]/.config/worktrunk/config.toml b[TEMP_HOME]/.config/worktrunk/config.toml.new
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
index 18fa6cb5a..cbb2fe5ba 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
@@ -47,7 +47,7 @@ exit_code: 0
PROJECT CONFIG _REPO_/.config/wt.toml
▲ Project config uses deprecated config sections: [commit-generation] → [commit.generation]
-↳ Wrote migrated wt.toml.new. To apply:
+○ Wrote migrated wt.toml.new. To apply:
  mv -- _REPO_/.config/wt.toml.new _REPO_/.config/wt.toml
○ Diff:
  diff --git a_REPO_/.config/wt.toml b_REPO_/.config/wt.toml.new
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap b/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap
index 923167fb3..d53082882 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap
@@ -24,10 +24,13 @@ info:
SHELL: ""
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
@@ -45,5 +48,5 @@ exit_code: 0
----- stderr -----
▲ User config has deprecated settings. To see details, run wt config show
-↳ Wrote migrated test-config.toml.new. To apply:
+○ Wrote migrated test-config.toml.new. To apply:
  mv -- [TEST_CONFIG_NEW] [TEST_CONFIG]
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap b/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap
index 923167fb3..d53082882 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap
@@ -24,10 +24,13 @@ info:
SHELL: ""
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
@@ -45,5 +48,5 @@ exit_code: 0
----- stderr -----
▲ User config has deprecated settings. To see details, run wt config show
-↳ Wrote migrated test-config.toml.new. To apply:
+○ Wrote migrated test-config.toml.new. To apply:
  mv -- [TEST_CONFIG_NEW] [TEST_CONFIG]
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap b/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap
index 923167fb3..d53082882 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap
@@ -24,10 +24,13 @@ info:
SHELL: ""
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
@@ -45,5 +48,5 @@ exit_code: 0
----- stderr -----
▲ User config has deprecated settings. To see details, run wt config show
-↳ Wrote migrated test-config.toml.new. To apply:
+○ Wrote migrated test-config.toml.new. To apply:
  mv -- [TEST_CONFIG_NEW] [TEST_CONFIG]
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_verbose_shows_content.snap b/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_verbose_shows_content.snap
index 9b9739779..e743aa593 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_verbose_shows_content.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_verbose_shows_content.snap
@@ -25,10 +25,13 @@ info:
SHELL: ""
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
@@ -46,7 +49,7 @@ exit_code: 0
----- stderr -----
▲ User config has deprecated settings. To see details, run wt config show
-↳ Wrote migrated test-config.toml.new. To apply:
+○ Wrote migrated test-config.toml.new. To apply:
  mv -- [TEST_CONFIG_NEW] [TEST_CONFIG]
○ Expanding worktree-path
  ../{{ main_worktree }}.{{ branch }} → ../repo.feature-a