From dcf425c846dcd6fbb0c05e87342077ab870eb7e1 Mon Sep 17 00:00:00 2001 From: Bjørn Erik Pedersen Date: Wed, 23 Aug 2023 12:39:24 +0200 Subject: 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 --- testscripts/commands/mod__disable.txt | 15 +++++++++++++++ testscripts/commands/mod_vendor.txt | 5 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 testscripts/commands/mod__disable.txt (limited to 'testscripts') diff --git a/testscripts/commands/mod__disable.txt b/testscripts/commands/mod__disable.txt new file mode 100644 index 000000000..f2d65dd0c --- /dev/null +++ b/testscripts/commands/mod__disable.txt @@ -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 + diff --git a/testscripts/commands/mod_vendor.txt b/testscripts/commands/mod_vendor.txt index 8a77776b3..5ca10aa75 100644 --- a/testscripts/commands/mod_vendor.txt +++ b/testscripts/commands/mod_vendor.txt @@ -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 -- cgit v1.2.3