Signed-off-by: phith0n <phith0n.ph2f@gmail.com>
This commit is contained in:
phith0n 2021-02-02 00:57:20 +08:00
parent 275f7e7766
commit 3825f5837e
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import (
"net/http"
"os"
"path"
"path/filepath"
"strings"
"github.com/shurcooL/httpfs/filter"
@ -32,7 +33,7 @@ var Assets = func() http.FileSystem {
panic(err)
}
var assetsPrefix string
switch path.Base(wd) {
switch filepath.Base(wd) {
case "prometheus":
// When running Prometheus (without built-in assets) from the repo root.
assetsPrefix = "./web/ui"