Skip to content

Commit

Permalink
Fix for issue ChrisChinchilla#33
Browse files Browse the repository at this point in the history
  • Loading branch information
hangie committed Apr 4, 2024
1 parent b1819ae commit 419abe7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/features/vsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 419abe7

Please sign in to comment.