Skip to content

Commit 81afd8f

Browse files
authored
docs, cmd: fix broken docs source links regression in vdoc (#23889)
1 parent aebe9bc commit 81afd8f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎cmd/tools/vdoc/vdoc.v‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,18 @@ fn (mut vd VDoc) generate_docs_from_file() {
303303
} else {
304304
os.dir(cfg.input_path)
305305
}
306-
manifest_path := os.join_path(dir_path, 'v.mod')
306+
manifest_path := if cfg.is_vlib {
307+
os.join_path(vroot, 'v.mod')
308+
} else {
309+
os.join_path(dir_path, 'v.mod')
310+
}
307311
if os.exists(manifest_path) {
308312
vd.vprintln('Reading v.mod info from ${manifest_path}')
309313
if manifest := vmod.from_file(manifest_path) {
310314
vd.manifest = manifest
311315
}
316+
} else if cfg.is_vlib {
317+
assert false, 'vdoc: manifest does not exist for vlib'
312318
}
313319
if cfg.include_readme || cfg.is_vlib {
314320
mut readme_name := 'README'

0 commit comments

Comments
 (0)