Commit 0b9536146fb4a221ca869e5afd7638014c0abe3a

Thomas de Grivel 2023-02-28T16:33:21

rbpkg_ci_mux

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/lib/rbpkg.rb b/lib/rbpkg.rb
index c0b0adb..676220d 100644
--- a/lib/rbpkg.rb
+++ b/lib/rbpkg.rb
@@ -124,9 +124,14 @@ EOF
               if ! File.exist?(file) || File.mtime(file) <= File.mtime(subdir_file)
                 FileUtils.cp(subdir_file, file)
                 subdir_file_html = "#{subdir_file}.html"
-                FileUtils.cp(subdir_file_html, "#{file}.html")
+                if File.exist?(subdir_file_html)
+                  FileUtils.cp(subdir_file_html, "#{file}.html")
+                  html = "#{d}/#{subdir_file_html}"
+                else
+                  html = nil
+                end
                 log_item = {log: "#{d}/#{subdir_file}",
-                            html: "#{d}/#{subdir_file_html}",
+                            html: html,
                             status: status[name][d_name]}
                 if ! log[name]
                   log[name] = {}