|
1 | 1 | import { dirname, basename, normalize, relative } from "path"; |
2 | 2 | import { Discovery } from "../common/discovery"; |
3 | 3 | import { CodeQLCliServer } from "../codeql-cli/cli"; |
4 | | -import { Event, RelativePattern, Uri, WorkspaceFolder, env } from "vscode"; |
| 4 | +import { Event, RelativePattern, Uri, WorkspaceFolder } from "vscode"; |
5 | 5 | import { MultiFileSystemWatcher } from "../common/vscode/multi-file-system-watcher"; |
6 | 6 | import { App } from "../common/app"; |
7 | 7 | import { FileTreeDirectory, FileTreeLeaf } from "../common/file-tree-nodes"; |
@@ -41,7 +41,10 @@ export class QueryDiscovery |
41 | 41 | new MultiFileSystemWatcher(), |
42 | 42 | ); |
43 | 43 |
|
44 | | - constructor(app: App, private readonly cliServer: CodeQLCliServer) { |
| 44 | + constructor( |
| 45 | + private readonly app: App, |
| 46 | + private readonly cliServer: CodeQLCliServer, |
| 47 | + ) { |
45 | 48 | super("Query Discovery", extLogger); |
46 | 49 |
|
47 | 50 | this.onDidChangeQueriesEmitter = this.push(app.createEventEmitter<void>()); |
@@ -124,7 +127,11 @@ export class QueryDiscovery |
124 | 127 | return undefined; |
125 | 128 | } |
126 | 129 |
|
127 | | - const rootDirectory = new FileTreeDirectory<string>(fullPath, name, env); |
| 130 | + const rootDirectory = new FileTreeDirectory<string>( |
| 131 | + fullPath, |
| 132 | + name, |
| 133 | + this.app.environment, |
| 134 | + ); |
128 | 135 | for (const queryPath of resolvedQueries) { |
129 | 136 | const relativePath = normalize(relative(fullPath, queryPath)); |
130 | 137 | const dirName = dirname(relativePath); |
|
0 commit comments