Skip to content

Commit

Permalink
get pint executable even when it is under an excluded path
Browse files Browse the repository at this point in the history
  • Loading branch information
fritz-c authored and d8vjork committed Dec 26, 2023
1 parent e87e6b4 commit 05cebb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"esbuild": "^0.15.15",
"eslint": "^8.28.0",
"fs-extra": "^10.1.0",
"glob": "^8.0.3",
"glob": "^10.3.3",
"mocha": "^9.2.2",
"node-fetch": "^3.3.0",
"ovsx": "^0.5.2",
Expand Down
12 changes: 7 additions & 5 deletions src/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { accessSync, constants } from "fs";
import path = require("path");
import { commands, MessageItem, RelativePattern, window, workspace, WorkspaceFolder } from "vscode";
import { glob } from "glob";
import { commands, MessageItem, window, workspace, WorkspaceFolder } from "vscode";
import { LoggingService } from "./LoggingService";
import { RESTART_TO_ENABLE } from "./message";
import { ExtensionConfig } from "./types";
Expand Down Expand Up @@ -48,11 +49,12 @@ export function isRelativeTo(from: string, to: string) {
}

export async function resolvePathFromWorkspaces(pattern: string, relativeTo: WorkspaceFolder) {
const matchedPaths = await workspace.findFiles(
new RelativePattern(relativeTo, pattern)
);
const matchedPaths = await glob(pattern, {
cwd: relativeTo.uri.fsPath,
absolute: true,
});

return matchedPaths.map(foundUri => foundUri.fsPath);
return matchedPaths;
}

export function onConfigChange(loggingService: LoggingService) {
Expand Down

0 comments on commit 05cebb7

Please sign in to comment.