Skip to content

Commit 7da2ec2

Browse files
authored
Merge pull request #13023 from Byron/fix-test-isolation
isolate editor env in reword CLI tests
2 parents e718c96 + 93e68de commit 7da2ec2

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

crates/but-testsupport/src/prepare_cmd_env.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ fn updates() -> Vec<EnvOp> {
5454
EnvOp::Remove("GIT_COMMON_DIR"),
5555
EnvOp::Remove("GIT_ASKPASS"),
5656
EnvOp::Remove("SSH_ASKPASS"),
57+
EnvOp::Remove("GIT_EDITOR"),
58+
EnvOp::Remove("VISUAL"),
59+
EnvOp::Remove("EDITOR"),
5760
]
5861
.into_iter()
5962
.chain(

crates/but/tests/but/command/reword.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn reword_branch_from_editor_trims_trailing_newlines_in_confirmation_output() ->
8989
"#!/usr/bin/env bash\nprintf 'renamed-branch\\n\\n' > \"$1\"\n",
9090
);
9191
env.but("reword branch-to-rename-123")
92-
.env("EDITOR", "bash editor.sh")
92+
.env("GIT_EDITOR", "bash editor.sh")
9393
.assert()
9494
.success()
9595
.stdout_eq(str![[r#"

0 commit comments

Comments
 (0)