diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-08-14 11:34:21 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-08-15 10:18:19 +0200 |
commit | 2168c5b125020a1841450730edc1b0ed2141d239 (patch) | |
tree | 7edfa01d9f1e0c921f08a468f9e5202e5569c529 /hugofs | |
parent | b3ad58fa04fb2447d1a788d1fe61b2ed581a403e (diff) | |
download | hugo-2168c5b125020a1841450730edc1b0ed2141d239.tar.gz hugo-2168c5b125020a1841450730edc1b0ed2141d239.zip |
Upgrade to Go 1.23
Fixes #12763
Diffstat (limited to 'hugofs')
-rw-r--r-- | hugofs/fs.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hugofs/fs.go b/hugofs/fs.go index fc0ea71c6..fab0d3886 100644 --- a/hugofs/fs.go +++ b/hugofs/fs.go @@ -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)) } |