Skip to content

Commit

Permalink
Simplify ExecuteActivityOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 committed Aug 7, 2024
1 parent 2e4929b commit 3f68dae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion utils/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ export interface ExecuteActivityOutput {
/**
* The output log message(s) to display on success or fail
*/
message?: string | string[];
message?: string;
}

export declare enum ActivityOutputType {
Expand Down
13 changes: 4 additions & 9 deletions utils/src/wizard/AzureWizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,11 @@ export class AzureWizard<T extends (IInternalActionContext & Partial<types.Execu
this._context.activityChildren?.push(output.item);
}

if (!output.message ||
options.suppressActivityOutput === ActivityOutputType.Message ||
options.suppressActivityOutput === ActivityOutputType.All
if (output.message &&
options.suppressActivityOutput !== ActivityOutputType.Message &&
options.suppressActivityOutput !== ActivityOutputType.All
) {
return;
}

output.message = Array.isArray(output.message) ? output.message : [output.message];
for (const message of output.message) {
ext.outputChannel?.appendLog(message);
ext.outputChannel?.appendLog(output.message);
}
}

Expand Down

0 comments on commit 3f68dae

Please sign in to comment.