aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugofs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-08-14 11:34:21 +0200
committerBjørn Erik Pedersen <[email protected]>2024-08-15 10:18:19 +0200
commit2168c5b125020a1841450730edc1b0ed2141d239 (patch)
tree7edfa01d9f1e0c921f08a468f9e5202e5569c529 /hugofs
parentb3ad58fa04fb2447d1a788d1fe61b2ed581a403e (diff)
downloadhugo-2168c5b125020a1841450730edc1b0ed2141d239.tar.gz
hugo-2168c5b125020a1841450730edc1b0ed2141d239.zip
Upgrade to Go 1.23
Fixes #12763
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 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))
}