Skip to content

Commit

Permalink
Error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Dec 24, 2023
1 parent 05d06b0 commit 0557f9f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/dependency-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,20 @@ export async function setup(option: DependencyGraphOption): Promise<void> {
}

export async function complete(option: DependencyGraphOption): Promise<void> {
switch (option) {
case DependencyGraphOption.Disabled:
case DependencyGraphOption.DownloadAndSubmit: // Performed in setup
return
case DependencyGraphOption.Generate:
await uploadDependencyGraphs()
return
case DependencyGraphOption.GenerateAndSubmit:
await submitDependencyGraphs(await uploadDependencyGraphs())
return
try {
switch (option) {
case DependencyGraphOption.Disabled:
case DependencyGraphOption.DownloadAndSubmit: // Performed in setup
return
case DependencyGraphOption.Generate:
await uploadDependencyGraphs()
return
case DependencyGraphOption.GenerateAndSubmit:
await submitDependencyGraphs(await uploadDependencyGraphs())
return
}
} catch (e) {
core.warning(`Process dependency graph failed. Will continue. ${String(e)}`)
}
}

Expand Down

0 comments on commit 0557f9f

Please sign in to comment.