Fix Jekyll import
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 30 Jul 2019 07:14:14 +0000 (09:14 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 30 Jul 2019 07:14:14 +0000 (09:14 +0200)
Fixes #6131

cache/filecache/filecache.go

index bf004c8f7b65ff2a0a01082b6292d43ab60de051..bc0573d52c78a7550c179622b949cab7c2e8d3b3 100644 (file)
@@ -334,6 +334,14 @@ func NewCaches(p *helpers.PathSpec) (Caches, error) {
                        cfs = fs
                }
 
+               if cfs == nil {
+                       // TODO(bep) we still have some places that do not initialize the
+                       // full dependencies of a site, e.g. the import Jekyll command.
+                       // That command does not need these caches, so let us just continue
+                       // for now.
+                       continue
+               }
+
                baseDir := v.Dir
 
                if err := cfs.MkdirAll(baseDir, 0777); err != nil && !os.IsExist(err) {