From e8ce1cef8bdc0faa94d9cc4f50a5ed9d6bba1f47 Mon Sep 17 00:00:00 2001 From: Julian Figueroa Date: Thu, 22 Feb 2024 12:30:32 -0500 Subject: [PATCH] Skip WKT files when exporting --- private/buf/cmd/buf/command/export/export.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/private/buf/cmd/buf/command/export/export.go b/private/buf/cmd/buf/command/export/export.go index 4223daccde..44ed226bb2 100644 --- a/private/buf/cmd/buf/command/export/export.go +++ b/private/buf/cmd/buf/command/export/export.go @@ -22,6 +22,7 @@ import ( "github.com/bufbuild/buf/private/buf/bufcli" "github.com/bufbuild/buf/private/buf/bufctl" "github.com/bufbuild/buf/private/bufpkg/bufmodule" + "github.com/bufbuild/buf/private/gen/data/datawkt" "github.com/bufbuild/buf/private/pkg/app/appcmd" "github.com/bufbuild/buf/private/pkg/app/appext" "github.com/bufbuild/buf/private/pkg/storage" @@ -176,6 +177,10 @@ func run( return errors.New("no .proto target files found") } for _, imageFile := range image.Files() { + if datawkt.Exists(imageFile.Path()) { + // export doesn't include WKT files, they're not present in the workspace bucket + continue + } moduleFile, err := moduleReadBucket.GetFile(ctx, imageFile.Path()) if err != nil { return err