fix crash when overriding BASE_URL
Alan Pearce alan@alanpearce.eu
Sun, 21 Apr 2024 22:22:24 +0200
1 files changed, 4 insertions(+), 1 deletions(-)
jump to
M cmd/build/build.go → cmd/build/build.go
@@ -566,7 +566,10 @@ if err != nil { 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 {