From 93c09fdde95338ba2f9afe1f0f3e481ab6a04c0e Mon Sep 17 00:00:00 2001 From: Yuanlin Lin Date: Tue, 21 Nov 2023 17:05:35 +0800 Subject: [PATCH] fix(pkg): Ignore not found error when copying public dir --- internal/nodejs/nextjs/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/nodejs/nextjs/main.go b/internal/nodejs/nextjs/main.go index bbf7ba72..a7705f1f 100644 --- a/internal/nodejs/nextjs/main.go +++ b/internal/nodejs/nextjs/main.go @@ -142,7 +142,7 @@ func TransformServerless(image, workdir string) error { } err = cp.Copy(path.Join(workdir, "public"), path.Join(zeaburOutputDir, "static")) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "no such file or directory") { return fmt.Errorf("copy public dir: %w", err) }