Skip to content

Commit

Permalink
serverutil/frontend: don't serve downloads page when no config present
Browse files Browse the repository at this point in the history
We plan to start hosting Upspin releases by another mechanism, and so
make it possible to run the frontend without the downloads page by
not providing an upspin config.

Change-Id: Icc51d83ee8bf6d060156d5a948afa7a9556e0bf5
Reviewed-on: https://upspin-review.googlesource.com/c/upspin/+/19743
Reviewed-by: adg@google.com <adg@google.com>
  • Loading branch information
adg committed May 26, 2022
1 parent 38023b8 commit c626106
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion serverutil/frontend/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/russross/blackfriday"

"upspin.io/config"
"upspin.io/errors"
"upspin.io/flags"
"upspin.io/log"
"upspin.io/serverutil/web"
Expand Down Expand Up @@ -53,7 +54,9 @@ func Main() {
})
} else {
cfg, err := config.FromFile(flags.Config)
if err != nil {
if errors.Is(errors.NotExist, err) {
log.Info.Printf("Upspin config not found; running without downloads page.")
} else if err != nil {
log.Fatal(err)
}
s, err := newServer(cfg, *docPath)
Expand Down

0 comments on commit c626106

Please sign in to comment.