Skip to content

Commit

Permalink
Fix wdl-lsp check in VS Code (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
dinvlad authored Apr 23, 2024
1 parent 5c2d921 commit 51b44f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ export async function activate(context: ExtensionContext) {
}

try {
const { stdout } = await promisify(execFile)(pythonPath, ["-m", "pip", "show", "wdl-lsp"]);
const { stdout } = await promisify(execFile)(pythonPath, ["-m", "pip", "show", "wdl-lsp"]).catch(err => {
console.log(err);
return { stdout: "" };
});
const versionStr = stdout.split('\n').find(line => line.startsWith('Version:'));
if (!versionStr || versionStr.split(':')[1].trim() !== version) {
await promisify(execFile)(pythonPath, [
Expand Down

0 comments on commit 51b44f7

Please sign in to comment.