diff --git a/app.go b/app.go index 62b8f7b..e7b16b4 100644 --- a/app.go +++ b/app.go @@ -3,6 +3,7 @@ package main import ( "bytes" "context" + "errors" "fmt" "io" "io/ioutil" @@ -61,7 +62,9 @@ func ensureHugoBin(homeDir string) error { hugoTarPath := filepath.Join(hugoDir, fmt.Sprintf("hugo-%s.tar.gz", hugoVersion)) url := fmt.Sprintf("https://github.com/gohugoio/hugo/releases/download/v%s/hugo_extended_%s_linux-amd64.tar.gz", hugoVersion, hugoVersion) - if _, err := os.Stat(hugoBinPath); err != nil && os.IsNotExist(err) { + if _, err := os.Stat(hugoBinPath); err == nil { + return nil + } else if errors.Is(err, os.ErrNotExist) { if err := httpGetFile(hugoTarPath, url); err != nil { return err } diff --git a/frontend/index.html b/frontend/index.html index 8a9ca36..d6f0da0 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -8,7 +8,7 @@ - -
+
+

Initialising Hugo...