You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing code assumed there was always at least one workspace
folder, but this led to an error if there were zero. This can be
reproduced by calling "Close Workspace" if one is open and then running
Pester tests. Since the `vscode.debug.startDebugging()` interface does
not require a workspace folder, and in fact expects "undefined" if none
is available, we simply use TypeScript's "optional chaining" (AKA
conditional access) operator to return undefined if `workspaceFolders`
is null, and otherwise return the first workspace folder.
0 commit comments