Merge pull request #9277 from reitermarkus/app-source-not-there

Add debug information for empty BOM error.
This commit is contained in:
Markus Reiter 2020-11-24 19:26:57 +01:00 committed by GitHub
commit 63dead36cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,8 +91,10 @@ module UnpackStrategy
Tempfile.open(["", ".bom"]) do |bomfile|
bomfile.close
bom = path.bom
Tempfile.open(["", ".list"]) do |filelist|
filelist.puts(path.bom)
filelist.puts(bom)
filelist.close
system_command! "mkbom",
@ -100,9 +102,14 @@ module UnpackStrategy
verbose: verbose
end
system_command! "ditto",
args: ["--bom", bomfile.path, "--", path, unpack_dir],
verbose: verbose
result = system_command! "ditto",
args: ["--bom", bomfile.path, "--", path, unpack_dir],
verbose: verbose
odebug "BOM contents:", bom
if result.stderr.include?("contains no files, nothing copied")
odebug "Directory contents:", Pathname.glob(path/"**/*", File::FNM_DOTMATCH).map(&:to_s).join("\n")
end
FileUtils.chmod "u+w", Pathname.glob(unpack_dir/"**/*", File::FNM_DOTMATCH).reject(&:symlink?)
end