Skip to content

Commit 9e26518

Browse files
authored
Merge pull request #319 from hashicorp/docs-fix
docs: ignore packer base repo for partial docs generation
2 parents 8617f12 + 91be3ff commit 9e26518

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

cmd/packer-sdc/internal/struct-markdown/struct_markdown.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,9 @@ func (cmd *Command) Run(args []string) int {
9090
}
9191
docsFolder = filepath.Join("content", "packer", latestVersion, "content", "partials")
9292
break
93-
} else {
94-
projectRoot = dir
95-
filePath, _ = filepath.Rel(projectRoot, absFilePath)
96-
docsFolder = filepath.Join("website", "content", "partials")
97-
break
9893
}
94+
// Packer repo without web-unified-docs: exit silently without generating docs
95+
return 0
9996
}
10097
if base == "packer-plugin-sdk" {
10198
projectRoot = dir
@@ -112,7 +109,7 @@ func (cmd *Command) Run(args []string) int {
112109
}
113110

114111
if projectRoot == "" {
115-
log.Fatal("Failed to guess project ROOT. If this is a Packer plugin project please make sure the root directory begins with`packer-plugin-*`")
112+
log.Fatal("Failed to guess project ROOT. If this is a Packer plugin project please make sure the root directory begins with `packer-plugin-*`")
116113
}
117114

118115
b, err := os.ReadFile(fname)

0 commit comments

Comments
 (0)