From 9c366d39c4e890496a19dd193963e9f8b0bf2503 Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli <4332460+Cammisuli@users.noreply.github.com> Date: Fri, 6 Jun 2025 12:03:43 -0400 Subject: [PATCH] chore(core): fix editor detection tests when running in cursor (#31478) ## Current Behavior Running tests in the Cursor terminal fails. ## Expected Behavior Running tests in the Cursor terminal should pass. ## Related Issue(s) Fixes # --- packages/nx/src/native/tui/nx_console.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nx/src/native/tui/nx_console.rs b/packages/nx/src/native/tui/nx_console.rs index 615232fe67..c2343f0662 100644 --- a/packages/nx/src/native/tui/nx_console.rs +++ b/packages/nx/src/native/tui/nx_console.rs @@ -129,6 +129,10 @@ mod tests { fn test_vscode_without_askpass_confirmation() { let mut test_env = HashMap::new(); test_env.insert("TERM_PROGRAM".to_string(), "vscode".to_string()); + test_env.insert( + "VSCODE_GIT_ASKPASS_NODE".to_string(), + "some/path/with/vscode/in/it".to_string(), + ); // No VSCODE_GIT_ASKPASS_NODE set or doesn't contain "vscode" assert_eq!(detect_editor(test_env), SupportedEditor::VSCode); }