-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
Environment:OS: Windows
node.js / npm versions:
Additional info:
-
1
-
Not Needed
-
Developer Tools
Problem Statement/Rationale
launchMongoShell.ts matches the literal string `powershell.exe`. PowerShell 7 installs as `pwsh.exe`, so it matches nothing and $MDB_CONNECTION_STRING is parsed as an ordinary PowerShell variable that was never set, which expands to empty with no error. As a result, the user silently connects to localhost instead of the cluster they selected.
Steps to Reproduce
- Windows, `terminal.integrated.defaultProfile.windows` set to PowerShell 7 (pwsh)
- Connect to any remote cluster
- Launch MongoDB Shell
Expected Results
mongosh connects to the selected cluster.
Actual Results
mongosh starts against localhost.