commands: Ignore "module does not exist" errors in hugo mod init

Closes #11458
This commit is contained in:
Bjørn Erik Pedersen 2024-09-19 10:53:39 +02:00
parent c260cb28a9
commit e363964f2f
10 changed files with 92 additions and 50 deletions

View file

@ -0,0 +1,15 @@
# Test the hugo init command.
dostounix golden/go.mod.testsubmod
hugo mod init testsubmod
cmpenv go.mod $WORK/golden/go.mod.testsubmod
-- hugo.toml --
title = "Hugo Modules Test"
[module]
[[module.imports]]
path="github.com/bep/empty-hugo-module"
-- golden/go.mod.testsubmod --
module testsubmod
go ${GOVERSION}