aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugofs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-02-19 16:59:54 +0100
committerBjørn Erik Pedersen <[email protected]>2020-02-19 17:14:35 +0100
commitdce210ab56fc885818fc5d1a084a1c3ba84e7929 (patch)
tree538afbc8dfc1ed805c874f53248e25b506ebf6cc /hugofs
parent0b96aba022d51cf9939605c029bb8dba806653a1 (diff)
downloadhugo-dce210ab56fc885818fc5d1a084a1c3ba84e7929.tar.gz
hugo-dce210ab56fc885818fc5d1a084a1c3ba84e7929.zip
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