提交 b01ffcf5 编写于 作者: D Dirk Baeumer

Fixes #28489: Bug with tasks in realease 1.13

上级 46843c36
......@@ -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);
});
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册