From 419abe7339c7c7d64d2caa851bb9e3c72c481bc1 Mon Sep 17 00:00:00 2001 From: Mark O'Keefe Date: Thu, 4 Apr 2024 13:28:19 +1100 Subject: [PATCH] Fix for issue #33 --- src/features/vsUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/vsUtils.ts b/src/features/vsUtils.ts index 49e2f40..7d5b2e6 100644 --- a/src/features/vsUtils.ts +++ b/src/features/vsUtils.ts @@ -12,10 +12,11 @@ function replaceWorkspaceFolder( customPath: string, file: vscode.TextDocument ): string | null { - customPath = path.normalize(customPath); const workspaceFolder = vscode.workspace.getWorkspaceFolder(file.uri); if (workspaceFolder) { - return customPath.replace("${workspaceFolder}", workspaceFolder.uri.fsPath); + customPath = customPath.replace("${workspaceFolder}", workspaceFolder.uri.fsPath); + customPath = path.normalize(customPath); + return customPath; } logger.appendLine( `Not running Vale on file '${file.uri}' as it is not contained within the workspace`