Skip to content

Commit 2ad3022

Browse files
committed
Update wkhtmltopdf
There was an error on macOS when a hard link to the archive exists (could be Time Machine). Even with `--keep` it states: 'Input file has 1 other link'. Using `--force` fixes this.
1 parent ef0d703 commit 2ad3022

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/wkhtmltopdf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ suffix = case RbConfig::CONFIG['host_os']
3030
binary = "#{__FILE__}_#{suffix}"
3131

3232
if File.exist?("#{binary}.bz2") && !File.exist?(binary)
33-
system("bzip2 --decompress --keep #{binary}.bz2") ||
33+
# There was an error on macOS when a hard link to the archive exists (could be
34+
# Time Machine). Even with `--keep` it states: 'Input file has 1 other link'.
35+
# Using `--force` fixes this.
36+
system("bzip2 --decompress --keep --force #{binary}.bz2") ||
3437
raise("Decompression of #{binary}.bz2 failed. Do you have bzip2 installed?")
3538
end
3639

0 commit comments

Comments
 (0)