summaryrefslogtreecommitdiffstats
path: root/testscripts/commands
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-08-23 12:39:24 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-08-23 18:05:18 +0200
commitdcf425c846dcd6fbb0c05e87342077ab870eb7e1 (patch)
tree603f96feb9bb7a7503d86a4788dc5a6918ba4045 /testscripts/commands
parent9a8c84d6000fab3ec6847a330c45bfe24b76265d (diff)
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
Diffstat (limited to 'testscripts/commands')
-rw-r--r--testscripts/commands/mod__disable.txt15
-rw-r--r--testscripts/commands/mod_vendor.txt5
2 files changed, 18 insertions, 2 deletions
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