mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Merge pull request #201082 from susiwen8/fix-201081
fix: `install` in `npm script` shouldn't be opened
This commit is contained in:
commit
8ee37dc19a
|
@ -16,7 +16,8 @@ import {
|
||||||
createTask, getPackageManager, getTaskName, isAutoDetectionEnabled, isWorkspaceFolder, INpmTaskDefinition,
|
createTask, getPackageManager, getTaskName, isAutoDetectionEnabled, isWorkspaceFolder, INpmTaskDefinition,
|
||||||
NpmTaskProvider,
|
NpmTaskProvider,
|
||||||
startDebugging,
|
startDebugging,
|
||||||
ITaskWithLocation
|
ITaskWithLocation,
|
||||||
|
INSTALL_SCRIPT
|
||||||
} from './tasks';
|
} from './tasks';
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +83,7 @@ class NpmScript extends TreeItem {
|
||||||
: task.task.name;
|
: task.task.name;
|
||||||
super(name, TreeItemCollapsibleState.None);
|
super(name, TreeItemCollapsibleState.None);
|
||||||
this.taskLocation = task.location;
|
this.taskLocation = task.location;
|
||||||
const command: ExplorerCommands = workspace.getConfiguration('npm').get<ExplorerCommands>('scriptExplorerAction') || 'open';
|
const command: ExplorerCommands = name === `${INSTALL_SCRIPT} ` ? 'run' : workspace.getConfiguration('npm').get<ExplorerCommands>('scriptExplorerAction') || 'open';
|
||||||
|
|
||||||
const commandList = {
|
const commandList = {
|
||||||
'open': {
|
'open': {
|
||||||
|
|
|
@ -31,7 +31,7 @@ type AutoDetect = 'on' | 'off';
|
||||||
|
|
||||||
let cachedTasks: ITaskWithLocation[] | undefined = undefined;
|
let cachedTasks: ITaskWithLocation[] | undefined = undefined;
|
||||||
|
|
||||||
const INSTALL_SCRIPT = 'install';
|
export const INSTALL_SCRIPT = 'install';
|
||||||
|
|
||||||
export interface ITaskLocation {
|
export interface ITaskLocation {
|
||||||
document: Uri;
|
document: Uri;
|
||||||
|
|
Loading…
Reference in a new issue