mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02: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:
@@ -153,10 +153,6 @@ func (c *Client) Graph(w io.Writer) error {
|
||||
continue
|
||||
}
|
||||
|
||||
prefix := ""
|
||||
if module.Disabled() {
|
||||
prefix = "DISABLED "
|
||||
}
|
||||
dep := pathVersion(module.Owner()) + " " + pathVersion(module)
|
||||
if replace := module.Replace(); replace != nil {
|
||||
if replace.Version() != "" {
|
||||
@@ -166,7 +162,7 @@ func (c *Client) Graph(w io.Writer) error {
|
||||
dep += " => " + replace.Dir()
|
||||
}
|
||||
}
|
||||
fmt.Fprintln(w, prefix+dep)
|
||||
fmt.Fprintln(w, dep)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user