Skip to content

Commit

Permalink
Fix for ${fileDirname} crash (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig authored Nov 7, 2023
1 parent ec87bc3 commit b1e2218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

import * as fsapi from 'fs-extra';
import { Disposable, env, l10n, LanguageStatusSeverity, LogOutputChannel } from 'vscode';
import { Disposable, env, l10n, LanguageStatusSeverity, LogOutputChannel, Uri } from 'vscode';
import { State } from 'vscode-languageclient';
import {
LanguageClient,
Expand All @@ -27,7 +27,7 @@ async function createServer(
initializationOptions: IInitOptions,
): Promise<LanguageClient> {
const command = settings.interpreter[0];
const cwd = settings.cwd;
const cwd = settings.cwd === '${fileDirname}' ? Uri.parse(settings.workspace).fsPath : settings.cwd;

// Set debugger path needed for debugging python code.
const newEnv = { ...process.env };
Expand Down

0 comments on commit b1e2218

Please sign in to comment.