mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
@@ -147,7 +147,8 @@ func isWrite(flag int) bool {
|
||||
// TODO(bep) move this to a more suitable place.
|
||||
func MakeReadableAndRemoveAllModulePkgDir(fs afero.Fs, dir string) (int, error) {
|
||||
// Safe guard
|
||||
if !strings.Contains(dir, "pkg") {
|
||||
// Note that the base directory changed from pkg to gomod_cache in Go 1.23.
|
||||
if !strings.Contains(dir, "pkg") && !strings.Contains(dir, "gomod") {
|
||||
panic(fmt.Sprint("invalid dir:", dir))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user