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:
15
testscripts/commands/mod__disable.txt
Normal file
15
testscripts/commands/mod__disable.txt
Normal 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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user