1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Fix it so disable a module does not disable transitive dependency required by others

The motivation behind the original implementation was probably to show disabled modules when running `hugo mod graph`.

Fixes #11376
This commit is contained in:
Bjørn Erik Pedersen
2023-08-23 12:39:24 +02:00
parent 9a8c84d600
commit dcf425c846
8 changed files with 37 additions and 42 deletions

View File

@ -0,0 +1,15 @@
hugo mod graph
stdout 'withhugotoml.*commonmod'
-- hugo.toml --
title = "Hugo Modules Test"
[module]
[[module.imports]]
path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
disable = true
[[module.imports]]
path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
-- go.mod --
module foo
go 1.19

View File

@ -20,5 +20,6 @@ go 1.19
module github.com/gohugoio/testmod
-- golden/vendor.txt --
# github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml v1.0.0
# github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.0.0
# github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml v1.1.0
# github.com/gohugoio/hugo-mod-integrationtests/commonmod v0.0.0-20230823103305-919cefe8a425
# github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.1.0