mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
add error
This commit is contained in:
parent
9fd56bbb92
commit
e3fdadc2d4
5
setup.go
5
setup.go
@ -1,6 +1,7 @@
|
|||||||
package hugo
|
package hugo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
@ -147,8 +148,8 @@ func parse(c *caddy.Controller, root string) (*Config, error) {
|
|||||||
if hugo, err := exec.LookPath("hugo"); err == nil {
|
if hugo, err := exec.LookPath("hugo"); err == nil {
|
||||||
conf.Hugo = hugo
|
conf.Hugo = hugo
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("It seems that you don't have 'hugo' on your PATH.\nAborting...")
|
fmt.Println("It seems that you don't have 'hugo' on your PATH.")
|
||||||
os.Exit(0)
|
return conf, errors.New("It seems that you don't have 'hugo' on your PATH.")
|
||||||
}
|
}
|
||||||
|
|
||||||
for c.Next() {
|
for c.Next() {
|
||||||
|
Loading…
Reference in New Issue
Block a user