modules: Throw an error running hugo mod vendor on mountless module - hugo - [fork] hugo port for 9front
 (HTM) git clone git@git.drkhsh.at/hugo.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 4ffaeaf15536596c94dc73b393ca7894e3bd5e2c
 (DIR) parent bf55afd71f2fdb47272ebf1188c9cc87df47b233
 (HTM) Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
       Date:   Mon, 15 Feb 2021 10:47:32 +0100
       
       modules: Throw an error running hugo mod vendor on mountless module
       
       Diffstat:
         M modules/client.go                   |       6 ++++++
       
       1 file changed, 6 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/modules/client.go b/modules/client.go
       @@ -237,6 +237,12 @@ func (c *Client) Vendor() error {
                                continue
                        }
        
       +                // See https://github.com/gohugoio/hugo/issues/8239
       +                // This is an error situation. We need something to vendor.
       +                if t.Mounts() == nil {
       +                        return errors.Errorf("cannot vendor module %q, need at least one mount", t.Path())
       +                }
       +
                        fmt.Fprintln(&modulesContent, "# "+t.Path()+" "+t.Version())
        
                        dir := t.Dir()