From eb161cc83688f40bcbd23aaa6109334d0f04f327 Mon Sep 17 00:00:00 2001 From: deberlhe-jb <92679328+deberlhe-jb@users.noreply.github.com> Date: Wed, 13 May 2026 14:33:42 +0200 Subject: [PATCH] Fix working directory --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index e1323c0..6aa3a2c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -210,7 +210,7 @@ class PHPCSFixer extends PHPCSFixerConfig { const args = this.getArgs(uri, filePath) const opts: SpawnOptionsWithoutStdio = {} if (uri.scheme == 'file') { - opts.cwd = path.dirname(uri.fsPath) + opts.cwd = this.resolveVscodeExpressions('${workspaceFolder}', {uri: uri}) } if (this.ignorePHPVersion) { opts.env = Object.create(process.env) @@ -276,7 +276,7 @@ class PHPCSFixer extends PHPCSFixerConfig { const args = this.getArgs(uri) const opts: SpawnOptionsWithoutStdio = {} if (uri.fsPath != '') { - opts.cwd = path.dirname(uri.fsPath) + opts.cwd = this.resolveVscodeExpressions('${workspaceFolder}', {uri: uri}) } if (this.ignorePHPVersion) { opts.env = Object.create(process.env)