-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Fix PowerShell shell integration when strict mode is enabled. #248625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Check if variable exists before accessing it to prevent script failures in strict mode.
|
Thanks for the PR. I added What are you seeing that makes you think we need to change this? |
|
@meganrogge Maybe in your configuration the global variable |
|
Interesting, I don't have any special config. What version are you using? |
I don't have any special config either. Quick search for the variable name through the vscode repo shows no other occurrence than the test in the integration script. What's the value of the variable on your system? |
|
I meant your pwsh version |
|
Looks like the var has no value, but it's not causing issues - are you seeing an error or issue? |
|
7.4.7 |
|
Yes, in the $error collection (exception due to undefined variable). And, of course, any integration code afterwards is not executed. |
|
@meganrogge The variable seems to be a posh-git thing. I don't have that installed. |
Check if variable exists before accessing it to prevent script failures in strict mode.