Rediscover Go settings only when Go work needs them

This commit is contained in:
2026-10-10 14:11:48 +00:00
parent 9333573cd8
commit c8eb64adec
8 changed files with 104 additions and 48 deletions

View File

@@ -127,13 +127,9 @@ func Publish(ctx context.Context, request Request) (Result, error) {
}
if request.AfterValidate != nil {
callbackErr := request.AfterValidate(ctx, captured, checks.ToolOwner)
refreshErr := checks.ToolOwner.Refresh(ctx)
if callbackErr != nil {
return result, fmt.Errorf("after candidate validation: %w", callbackErr)
}
if refreshErr != nil {
return result, fmt.Errorf("refresh Go settings after candidate callback: %w", refreshErr)
}
}
if err := candidate.Recheck(ctx, captured, ""); err != nil {
return result, fmt.Errorf("post-validation local guard: %w", err)