modules: Improve "module workspace" not found error

This commit is contained in:
Bjørn Erik Pedersen 2022-12-20 09:06:38 +01:00
parent 330fa89411
commit eda1e720cd
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -263,7 +263,7 @@ func decodeConfig(cfg config.Provider, pathReplacements map[string]string) (Conf
c.Workspace = filepath.Join(workingDir, c.Workspace)
}
if _, err := os.Stat(c.Workspace); err != nil {
return c, fmt.Errorf("module workspace %q does not exist", c.Workspace)
return c, fmt.Errorf("module workspace %q does not exist. Check your module.workspace setting (or HUGO_MODULE_WORKSPACE env var).", c.Workspace)
}
}
}