diff --git a/src/task/common/failTask.ts b/src/task/common/failTask.ts index 5f601a9..00bc9be 100644 --- a/src/task/common/failTask.ts +++ b/src/task/common/failTask.ts @@ -45,9 +45,9 @@ export default async function failTask() { // If in audit mode then we will succeed with issues, else we fail the task to halt the pipeline. - const taskResult = auditMode ? tl.TaskResult.Failed : tl.TaskResult.SucceededWithIssues; - - return tl.setResult(taskResult, 'Dependabot alerts caused pipeline failure.'); + const taskResult = auditMode ? tl.TaskResult.SucceededWithIssues : tl.TaskResult.Failed; + tl.setResult(taskResult, 'Dependabot alerts caused pipeline failure.'); + return; } // If there are no issues the pipeline may continue