diff options
author | Kishin Yagami <[email protected]> | 2016-08-14 07:35:43 +0900 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2016-08-14 00:35:43 +0200 |
commit | 661c9787ea9bd005375ca295cf50ed602ff342af (patch) | |
tree | 4e66baf5dfaf91c54b0beabac6e810be182bb759 /commands | |
parent | f6d4801ba488e34f898906d3d8b6757dc0f2b13e (diff) | |
download | hugo-661c9787ea9bd005375ca295cf50ed602ff342af.tar.gz hugo-661c9787ea9bd005375ca295cf50ed602ff342af.zip |
commands: Suppress 'missing static' error
Fixes #2311
Diffstat (limited to 'commands')
-rw-r--r-- | commands/hugo.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 1b2b3b3c7..d72c6acee 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -625,6 +625,7 @@ func getDirList() []string { var a []string dataDir := helpers.AbsPathify(viper.GetString("DataDir")) layoutDir := helpers.AbsPathify(viper.GetString("LayoutDir")) + staticDir := helpers.AbsPathify(viper.GetString("StaticDir")) walker := func(path string, fi os.FileInfo, err error) error { if err != nil { if path == dataDir && os.IsNotExist(err) { @@ -635,8 +636,13 @@ func getDirList() []string { if path == layoutDir && os.IsNotExist(err) { jww.WARN.Println("Skip LayoutDir:", err) return nil + } + if path == staticDir && os.IsNotExist(err) { + jww.WARN.Println("Skip StaticDir:", err) + return nil } + jww.ERROR.Println("Walker: ", err) return nil } @@ -671,7 +677,7 @@ func getDirList() []string { helpers.SymbolicWalk(hugofs.Source(), dataDir, walker) helpers.SymbolicWalk(hugofs.Source(), helpers.AbsPathify(viper.GetString("ContentDir")), walker) helpers.SymbolicWalk(hugofs.Source(), helpers.AbsPathify(viper.GetString("LayoutDir")), walker) - helpers.SymbolicWalk(hugofs.Source(), helpers.AbsPathify(viper.GetString("StaticDir")), walker) + helpers.SymbolicWalk(hugofs.Source(), staticDir, walker) if helpers.ThemeSet() { helpers.SymbolicWalk(hugofs.Source(), helpers.AbsPathify(viper.GetString("themesDir")+"/"+viper.GetString("theme")), walker) } |