Skip to content

Commit

Permalink
[Bug] 修复子任务状态同步错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualSJ committed Jan 10, 2024
1 parent 391e2ed commit b4d1849
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,16 @@ export async function executeTask(taskNameList: string[]) {
task.prefix = ' ';
const startTime = Date.now();
if (state === TaskState.unknown) {
state = TaskState.success;
try {
const config = await configMap[taskName](this.params);

// 执行任务
try {
const execState = await task.execute(this.workspace, config);
state = execState;
if (execState !== TaskState.success) {
state = execState;
}
} catch (error) {
const err = error as Error;
task.print(err.message);
Expand Down

0 comments on commit b4d1849

Please sign in to comment.