Add more BOM debug information.

This commit is contained in:
Markus Reiter 2020-11-24 21:58:40 +01:00
parent 4942d44604
commit b9fc7e100b

View File

@ -106,9 +106,18 @@ module UnpackStrategy
args: ["--bom", bomfile.path, "--", path, unpack_dir], args: ["--bom", bomfile.path, "--", path, unpack_dir],
verbose: verbose verbose: verbose
odebug "BOM contents:", bom
if result.stderr.include?("contains no files, nothing copied") if result.stderr.include?("contains no files, nothing copied")
odebug "Directory contents:", Pathname.glob(path/"**/*", File::FNM_DOTMATCH).map(&:to_s).join("\n") all_paths_find = system_command("find", args: [".", "-print0"], chdir: path, print_stderr: false)
.stdout
.split("\0")
all_paths_ruby = Pathname.glob(path/"**/*", File::FNM_DOTMATCH)
.map { |p| p.relative_path_from(path).to_s }
odebug "BOM contents:", bom
odebug "BOM contents (retry):", path.bom
odebug "Directory contents (find):", all_paths_find.join("\n")
odebug "Directory contents (Ruby):", all_paths_ruby.join("\n")
end end
FileUtils.chmod "u+w", Pathname.glob(unpack_dir/"**/*", File::FNM_DOTMATCH).reject(&:symlink?) FileUtils.chmod "u+w", Pathname.glob(unpack_dir/"**/*", File::FNM_DOTMATCH).reject(&:symlink?)