Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Cammisuli
Copy link
Member

Current Behavior

We use VSCODE_GIT_ASKPASS_NODE to detect vscode instances

Expected Behavior

We now use VSCODE_GIT_ASKPASS instead.

Related Issue(s)

Fixes #

@Cammisuli Cammisuli requested review from a team as code owners September 12, 2025 19:48
@Cammisuli Cammisuli requested a review from MaxKless September 12, 2025 19:48
@Cammisuli Cammisuli added the PR status: do not merge This will block a PR from being merged until this tag is removed. label Sep 12, 2025
Copy link

vercel bot commented Sep 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Sep 12, 2025 8:00pm

Copy link
Contributor

nx-cloud bot commented Sep 12, 2025

View your CI Pipeline Execution ↗ for commit 31d6b5c

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ❌ Failed 39m 31s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 2m 10s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 4s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 4s View ↗
nx documentation ✅ Succeeded 7m 7s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-12 20:40:41 UTC

Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nx Cloud is proposing a fix for your failed CI:

These test updates ensure that the IDE detection tests work correctly with the new VSCODE_GIT_ASKPASS environment variable instead of the old VSCODE_GIT_ASKPASS_NODE variable, which was changed in the main detection logic.

We verified this fix by re-running nx:test-native.

Suggested Fix changes
diff --git a/packages/nx/src/native/ide/detection.rs b/packages/nx/src/native/ide/detection.rs
index d3e7b8ba45..38da2f921d 100644
--- a/packages/nx/src/native/ide/detection.rs
+++ b/packages/nx/src/native/ide/detection.rs
@@ -90,7 +90,7 @@ mod tests {
         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(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/vscode/in/it".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::VSCode);
@@ -102,7 +102,7 @@ mod tests {
         test_env.insert("TERM_PROGRAM".to_string(), "vscode".to_string());
         test_env.insert("TERM_PROGRAM_VERSION".to_string(), "1.104.0".to_string());
         test_env.insert(
-            "VSCODE_GIT_ASKPASS_NODE".to_string(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/vscode-insiders/in/it".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::VSCode);
@@ -117,7 +117,7 @@ mod tests {
             "1.104.0-insider".to_string(),
         );
         test_env.insert(
-            "VSCODE_GIT_ASKPASS_NODE".to_string(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/vscode/in/it".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::VSCodeInsiders);
@@ -128,7 +128,7 @@ mod tests {
         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(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/cursor/in/it".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::Cursor);
@@ -139,7 +139,7 @@ mod tests {
         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(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/windsurf/in/it".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::Windsurf);
@@ -167,10 +167,10 @@ mod tests {
         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(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/vscode/in/it".to_string(),
         );
-        // No VSCODE_GIT_ASKPASS_NODE set or doesn't contain "vscode"
+        // No VSCODE_GIT_ASKPASS set or doesn't contain "vscode"
         assert_eq!(detect_editor(test_env), SupportedEditor::VSCode);
     }
 
@@ -179,7 +179,7 @@ mod tests {
         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(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/no/matching/editor".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::VSCode);
@@ -190,7 +190,7 @@ mod tests {
         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(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/VSCODE/in/it".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::VSCode);
@@ -211,7 +211,7 @@ mod tests {
     fn test_cursor_without_askpass_confirmation() {
         let mut test_env = HashMap::new();
         test_env.insert("TERM_PROGRAM".to_string(), "cursor".to_string());
-        // No VSCODE_GIT_ASKPASS_NODE set
+        // No VSCODE_GIT_ASKPASS set
         assert_eq!(detect_editor(test_env), SupportedEditor::Unknown);
     }
 
@@ -220,7 +220,7 @@ mod tests {
         let mut test_env = HashMap::new();
         test_env.insert("TERM_PROGRAM".to_string(), "cursor".to_string());
         test_env.insert(
-            "VSCODE_GIT_ASKPASS_NODE".to_string(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/no/matching/editor".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::Unknown);
@@ -230,7 +230,7 @@ mod tests {
     fn test_windsurf_without_askpass_confirmation() {
         let mut test_env = HashMap::new();
         test_env.insert("TERM_PROGRAM".to_string(), "windsurf".to_string());
-        // No VSCODE_GIT_ASKPASS_NODE set
+        // No VSCODE_GIT_ASKPASS set
         assert_eq!(detect_editor(test_env), SupportedEditor::Unknown);
     }
 
@@ -239,7 +239,7 @@ mod tests {
         let mut test_env = HashMap::new();
         test_env.insert("TERM_PROGRAM".to_string(), "windsurf".to_string());
         test_env.insert(
-            "VSCODE_GIT_ASKPASS_NODE".to_string(),
+            "VSCODE_GIT_ASKPASS".to_string(),
             "some/path/with/no/matching/editor".to_string(),
         );
         assert_eq!(detect_editor(test_env), SupportedEditor::Unknown);

Apply fix via Nx Cloud  Reject fix via Nx Cloud  Nx CloudView interactive diff and more actions ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR status: do not merge This will block a PR from being merged until this tag is removed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant