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