mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 04:48:33 +07:00
Make main module doc optional when in recursive generation
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@ footer-from: footer.md
|
||||
# recursive:
|
||||
# enabled: false
|
||||
# path: modules
|
||||
# include-main: false
|
||||
|
||||
# see: https://terraform-docs.io/user-guide/configuration/sections
|
||||
sections:
|
||||
|
||||
@@ -97,7 +97,7 @@ type module struct {
|
||||
func (r *Runtime) RunEFunc(cmd *cobra.Command, args []string) error { //nolint:gocyclo
|
||||
modules := []module{}
|
||||
|
||||
if r.config.Recursive.IncludeMain {
|
||||
if !r.config.Recursive.Enabled || r.config.Recursive.IncludeMain {
|
||||
modules = append(modules, module{r.rootDir, r.config})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user