Skip to content

Commit

Permalink
fix: raises errors when multiple installation detect
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Nov 20, 2024
1 parent af6537d commit e8ce545
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions internal/service/install_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,15 @@ func InstallPluginRuntimeToTenant(
})

if err == nil {
task.CompletedPlugins++
task.Plugins[i].Status = models.InstallTaskStatusSuccess
task.Plugins[i].Message = "Installed"
onDone(pluginUniqueIdentifier, pluginDeclaration)
if err := onDone(pluginUniqueIdentifier, pluginDeclaration); err != nil {
task.Plugins[i].Status = models.InstallTaskStatusFailed
task.Plugins[i].Message = err.Error()
} else {
task.CompletedPlugins++
task.Plugins[i].Status = models.InstallTaskStatusSuccess
task.Plugins[i].Message = "Installed"
}

continue
}

Expand Down

0 comments on commit e8ce545

Please sign in to comment.