about summary refs log tree commit diff stats
path: root/cmd/build/build.go
diff options
context:
space:
mode:
authorAlan Pearce2024-04-24 18:03:55 +0200
committerAlan Pearce2024-04-24 18:03:55 +0200
commite1524c7db6634f9b7c7d2a6073a997a5433594ea (patch)
treeda1ccd6c6dc279803249a43330e5d698cf03085c /cmd/build/build.go
parentbbfe6055609c4e7401f27d3dd4a5aa9c0a5242d6 (diff)
downloadwebsite-e1524c7db6634f9b7c7d2a6073a997a5433594ea.tar.lz
website-e1524c7db6634f9b7c7d2a6073a997a5433594ea.tar.zst
website-e1524c7db6634f9b7c7d2a6073a997a5433594ea.zip
build: fix error wrapping
Diffstat (limited to 'cmd/build/build.go')
-rw-r--r--cmd/build/build.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/build/build.go b/cmd/build/build.go
index 21eedbd..5daa940 100644
--- a/cmd/build/build.go
+++ b/cmd/build/build.go
@@ -36,11 +36,11 @@ func outputToFile(output io.Reader, filename ...string) error {
 func build(outDir string, config config.Config) error {
 	privateDir := path.Join(outDir, "private")
 	if err := mkdirp(privateDir); err != nil {
-		return errors.Errorf("could not create private directory: %w", err)
+		return errors.WithMessage(err, "could not create private directory")
 	}
 	publicDir := path.Join(outDir, "public")
 	if err := mkdirp(publicDir); err != nil {
-		return errors.Errorf("could not create public directory: %w", err)
+		return errors.WithMessage(err, "could not create public directory")
 	}
 
 	err := cp.Copy("static", publicDir, cp.Options{