fix(gateway): avoid err shadowing in plugin bootstrap

This commit is contained in:
xj 2026-02-28 20:02:43 -08:00
parent 1fae09b7a3
commit 602abd3eef

View file

@ -67,8 +67,8 @@ func gatewayCmd(debug bool) error {
return fmt.Errorf("error resolving configured plugins: %w", err)
}
if len(pluginsToEnable) > 0 {
if err := agentLoop.EnablePlugins(pluginsToEnable...); err != nil {
return fmt.Errorf("error enabling plugins: %w", err)
if enableErr := agentLoop.EnablePlugins(pluginsToEnable...); enableErr != nil {
return fmt.Errorf("error enabling plugins: %w", enableErr)
}
}
logger.InfoCF("agent", "Plugin selection resolved",