Skip to content

Commit c6b4535

Browse files
Protect against no RootUri (no open workspace) (#1107)
1 parent 7e2b6e7 commit c6b4535

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PowerShellEditorServices/Server/PsesLanguageServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public async Task StartAsync()
111111
var workspaceService = serviceProvider.GetService<WorkspaceService>();
112112

113113
// Grab the workspace path from the parameters
114-
workspaceService.WorkspacePath = request.RootUri.LocalPath;
114+
workspaceService.WorkspacePath = request.RootUri?.LocalPath;
115115

116116
// Set the working directory of the PowerShell session to the workspace path
117117
if (workspaceService.WorkspacePath != null

0 commit comments

Comments
 (0)