Skip to content

Commit bbc35aa

Browse files
authored
fixes for add pkg manually (#439)
fixes #329
1 parent 0206980 commit bbc35aa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/managers/common/pickers.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { QuickInputButtons, QuickPickItem, QuickPickItemButtonEvent, QuickPickItemKind, ThemeIcon, Uri } from 'vscode';
2-
import { Common, PackageManagement } from '../../common/localize';
32
import { launchBrowser } from '../../common/env.apis';
3+
import { Common, PackageManagement } from '../../common/localize';
44
import { showInputBoxWithButtons, showQuickPickWithButtons, showTextDocument } from '../../common/window.apis';
55
import { Installable } from './types';
66

@@ -15,7 +15,7 @@ const OPEN_EDITOR_BUTTON = {
1515
};
1616

1717
const EDIT_ARGUMENTS_BUTTON = {
18-
iconPath: new ThemeIcon('pencil'),
18+
iconPath: new ThemeIcon('add'),
1919
tooltip: PackageManagement.editArguments,
2020
};
2121

@@ -169,11 +169,12 @@ export async function selectFromCommonPackagesToInstall(
169169
if (selected && Array.isArray(selected)) {
170170
if (selected.find((s) => s.label === PackageManagement.enterPackageNames)) {
171171
const filtered = selected.filter((s) => s.label !== PackageManagement.enterPackageNames);
172-
const filler = filtered.map((s) => s.id).join(' ');
173172
try {
174-
const selections = await enterPackageManually(filler);
173+
const selections = await enterPackageManually();
175174
if (selections) {
176-
return selectionsToResult(selections, installed);
175+
const selectedResult: PackagesPickerResult = selectionsToResult(selections, installed);
176+
// only return the install part, since this button is only for adding to existing selection
177+
return { install: selectedResult.install, uninstall: [] };
177178
}
178179
return undefined;
179180
} catch (ex) {

0 commit comments

Comments
 (0)