about summary refs log tree commit diff stats
path: root/cmd/build/build.go
diff options
context:
space:
mode:
authorAlan Pearce2024-04-21 22:22:24 +0200
committerAlan Pearce2024-04-21 22:22:24 +0200
commit48c986422c8f6f08a36f1a801b7521daec787b26 (patch)
treeafae89056dcf237d2b92e90e9f10c6ac00c4bfe2 /cmd/build/build.go
parent221404cf6277a9696ccd1b95f0ab8be0f0720845 (diff)
downloadwebsite-48c986422c8f6f08a36f1a801b7521daec787b26.tar.lz
website-48c986422c8f6f08a36f1a801b7521daec787b26.tar.zst
website-48c986422c8f6f08a36f1a801b7521daec787b26.zip
fix crash when overriding BASE_URL
Diffstat (limited to 'cmd/build/build.go')
-rw-r--r--cmd/build/build.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/build/build.go b/cmd/build/build.go
index 254eff2..326b964 100644
--- a/cmd/build/build.go
+++ b/cmd/build/build.go
@@ -566,7 +566,10 @@ func main() {
 		log.Panic(errors.Errorf("could not get config: %v", err))
 	}
 
-	config.BaseURL = ioConfig.BaseURL
+	config.BaseURL.URL, err = url.Parse(ioConfig.BaseURL.String())
+	if err != nil {
+		log.Panic(errors.Errorf("highly unlikely: %v", err))
+	}
 
 	err = os.RemoveAll(ioConfig.Destination)
 	if err != nil {