Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/hugofs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-19 18:59:54 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-19 19:14:35 +0300
commitdce210ab56fc885818fc5d1a084a1c3ba84e7929 (patch)
tree538afbc8dfc1ed805c874f53248e25b506ebf6cc /hugofs
parent0b96aba022d51cf9939605c029bb8dba806653a1 (diff)
modules: Improve "hugo mod clean"
* Only clean project modules * Optional glob pattern of module paths to clean Closes #6907
Diffstat (limited to 'hugofs')
-rw-r--r--hugofs/fs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/hugofs/fs.go b/hugofs/fs.go
index c8c4c8afd..75beda970 100644
--- a/hugofs/fs.go
+++ b/hugofs/fs.go
@@ -15,6 +15,7 @@
package hugofs
import (
+ "fmt"
"os"
"strings"
@@ -97,7 +98,7 @@ func isWrite(flag int) bool {
func MakeReadableAndRemoveAllModulePkgDir(fs afero.Fs, dir string) (int, error) {
// Safe guard
if !strings.Contains(dir, "pkg") {
- panic("invalid dir")
+ panic(fmt.Sprint("invalid dir:", dir))
}
counter := 0