Skip to content

Commit d8c480c

Browse files
committed
ci: workaround defer codegen failing with nested if blocks and -cstrict in vdoc_file_test.v
1 parent caa5fb4 commit d8c480c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cmd/tools/vdoc/tests/vdoc_file_test.v

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,16 @@ fn test_out_path() {
7575
if os.getenv('CI') == 'true' {
7676
default_output_path := os.join_path(vroot, 'vlib', small_pure_v_vlib_module, '_docs')
7777
os.execute_opt('${vexe} doc -f html -m vlib/${small_pure_v_vlib_module}')!
78-
defer {
79-
os.rmdir_all(default_output_path) or {}
80-
}
8178
final_html_path := os.join_path(default_output_path, '${small_pure_v_vlib_module}.html')
8279
assert os.exists(final_html_path), final_html_path
8380

8481
// Custom out path (no `_docs` subdir).
8582
out_dir := os.join_path(vroot, 'vlib', small_pure_v_vlib_module, 'docs')
8683
os.execute_opt('${vexe} doc -f html -m -o ${out_dir} ${small_pure_v_vlib_module}')!
87-
defer {
88-
os.rmdir_all(out_dir) or {}
89-
}
9084
out_html_path := os.join_path(out_dir, '${small_pure_v_vlib_module}.html')
9185
assert os.exists(out_html_path), out_html_path
86+
os.rmdir_all(out_dir) or {}
87+
os.rmdir_all(default_output_path) or {}
9288
return
9389
}
9490

0 commit comments

Comments
 (0)