mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Fix for #49237 filter out duplicate task entries
This commit is contained in:
parent
a3576e1529
commit
a411c2f4e6
|
@ -314,6 +314,7 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider<TreeItem> {
|
|||
private buildTaskTree(tasks: Task[]): Folder[] | PackageJSON[] | NoScripts[] {
|
||||
let folders: Map<String, Folder> = new Map();
|
||||
let packages: Map<String, PackageJSON> = new Map();
|
||||
let scripts: Map<String, NpmScript> = new Map();
|
||||
|
||||
let folder = null;
|
||||
let packageJson = null;
|
||||
|
@ -334,8 +335,12 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider<TreeItem> {
|
|||
folder.addPackage(packageJson);
|
||||
packages.set(fullPath, packageJson);
|
||||
}
|
||||
let script = new NpmScript(this.extensionContext, packageJson, each);
|
||||
packageJson.addScript(script);
|
||||
let fullScriptPath = path.join(packageJson.path, each.name);
|
||||
if (!scripts.get(fullScriptPath)) {
|
||||
let script = new NpmScript(this.extensionContext, packageJson, each);
|
||||
packageJson.addScript(script);
|
||||
scripts.set(fullScriptPath, script);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (folders.size === 1) {
|
||||
|
|
Loading…
Reference in a new issue