mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 23:44:09 +01:00
Fixes #28489: Bug with tasks in realease 1.13
This commit is contained in:
@@ -854,26 +854,28 @@ namespace CommandConfiguration {
|
||||
runtime: undefined,
|
||||
presentation: undefined
|
||||
};
|
||||
fillProperty(target, source, 'name');
|
||||
if (target.name === void 0) {
|
||||
fillProperty(target, source, 'name');
|
||||
fillProperty(target, source, 'taskSelector');
|
||||
fillProperty(target, source, 'suppressTaskName');
|
||||
let args: string[] = source.args ? source.args.slice() : [];
|
||||
if (!target.suppressTaskName) {
|
||||
if (target.taskSelector !== void 0) {
|
||||
args.push(target.taskSelector + taskName);
|
||||
} else {
|
||||
args.push(taskName);
|
||||
}
|
||||
}
|
||||
if (target.args) {
|
||||
args = args.concat(target.args);
|
||||
}
|
||||
target.args = args;
|
||||
}
|
||||
fillProperty(target, source, 'runtime');
|
||||
fillProperty(target, source, 'taskSelector');
|
||||
fillProperty(target, source, 'suppressTaskName');
|
||||
|
||||
target.presentation = PresentationOptions.fillProperties(target.presentation, source.presentation);
|
||||
target.options = CommandOptions.fillProperties(target.options, source.options);
|
||||
|
||||
let args: string[] = source.args ? source.args.slice() : [];
|
||||
if (!target.suppressTaskName) {
|
||||
if (target.taskSelector !== void 0) {
|
||||
args.push(target.taskSelector + taskName);
|
||||
} else {
|
||||
args.push(taskName);
|
||||
}
|
||||
}
|
||||
if (target.args) {
|
||||
args = args.concat(target.args);
|
||||
}
|
||||
target.args = args;
|
||||
return target;
|
||||
}
|
||||
|
||||
|
||||
@@ -1530,4 +1530,30 @@ suite('Bugs / regression tests', () => {
|
||||
testConfiguration(external, builder);
|
||||
}
|
||||
});
|
||||
|
||||
test('Bug 28489', () => {
|
||||
let external = {
|
||||
version: '0.1.0',
|
||||
command: '',
|
||||
isShellCommand: true,
|
||||
args: [''],
|
||||
showOutput: 'always',
|
||||
'tasks': [
|
||||
{
|
||||
taskName: 'build',
|
||||
command: 'bash',
|
||||
args: [
|
||||
'build.sh'
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
let builder = new ConfiguationBuilder();
|
||||
builder.task('build', 'bash').
|
||||
group(Tasks.TaskGroup.Build).
|
||||
command().suppressTaskName(true).
|
||||
args(['build.sh']).
|
||||
runtime(Tasks.RuntimeType.Shell);
|
||||
testConfiguration(external, builder);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user