Skip to content

Commit

Permalink
Fix: Add a comment about workspaceFolder
Browse files Browse the repository at this point in the history
Co-authored-by: Enguerrand de Ribaucourt <[email protected]>
  • Loading branch information
Freed-Wu and deribaucourt committed Mar 6, 2024
1 parent f8fc47a commit 27702bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ connection.onInitialize(async (params: InitializeParams): Promise<InitializeResu

workspaceFolder = params.workspaceFolders?.[0].uri.replace('file://', '')

// If the language server is not started by VSCode, extensionPath and pathToBitbakeFolder can be undefined
// We provide alternatives here to prevent crashes when these variables are used
const extensionPath = params.initializationOptions?.extensionPath ?? workspaceFolder as string
pokyFolder = pokyFolder ?? workspaceFolder

Expand Down

0 comments on commit 27702bb

Please sign in to comment.