Regenerate local artifacts and invalidate stale receipts

This commit is contained in:
2026-10-06 00:56:44 +00:00
parent b744346210
commit b4d348dd1f
9 changed files with 90 additions and 40 deletions

View File

@@ -114,14 +114,6 @@ func Build(ctx context.Context, request Request) (Result, error) {
if err := os.MkdirAll(result.OutputDir, 0o755); err != nil {
return result, fmt.Errorf("create build output directory %q: %w", result.OutputDir, err)
}
for _, filename := range filenames {
path := filepath.Join(result.OutputDir, filename)
if _, err := os.Lstat(path); err == nil {
return result, fmt.Errorf("build output %q already exists; preserving caller-owned file", path)
} else if !errors.Is(err, os.ErrNotExist) {
return result, fmt.Errorf("inspect build output %q: %w", path, err)
}
}
compiler, err := runGo(ctx, repositoryDir, nil, "version")
if err != nil {