From 2c1a6f8b7a8ec604c813fee5036fad5f56e13d92 Mon Sep 17 00:00:00 2001 From: i-slam <80097500+i-slam@users.noreply.github.com> Date: Thu, 23 Jun 2022 11:00:58 +0100 Subject: [PATCH] Fix the active text editor uri This fix issue breaks the extension. on vs-code v1.68.1 not sure about older versions. --- src/phpstan.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phpstan.ts b/src/phpstan.ts index e3f91f9..898c048 100644 --- a/src/phpstan.ts +++ b/src/phpstan.ts @@ -56,8 +56,8 @@ export class PHPStan { this._numActive = 0; this._numQueued = 0; - this._command = commands.registerCommand("extension.scanForErrors", (file) => { - const path = file["fsPath"]; + this._command = commands.registerCommand("extension.scanForErrors", () => { + const path = window.activeTextEditor.document.uri.fsPath; if (fs.lstatSync(path).isDirectory()) { this.scanDirectory(path);