mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Fail builds if no files were installed (#13644)
This commit is contained in:
6
bin/crew
6
bin/crew
@@ -961,8 +961,12 @@ def prepare_package(destdir)
|
||||
[e[1..], File.symlink?(e) ? 0 : File.size(e)]
|
||||
end
|
||||
|
||||
# If the package is completely empty, something has probably gone wrong.
|
||||
total_size = filelist.values.sum
|
||||
abort 'total_size is 0. It seems that no files were installed.'.lightred if total_size.zero?
|
||||
|
||||
File.write 'filelist', <<~EOF
|
||||
# Total size: #{filelist.values.sum}
|
||||
# Total size: #{total_size}
|
||||
#{filelist.keys.sort.join("\n")}
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user