mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
modules: Improve "hugo mod clean"
* Only clean project modules * Optional glob pattern of module paths to clean Closes #6907
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user