lib/backup/packager.rb in backup-4.1.12 vs lib/backup/packager.rb in backup-4.2.0
- old
+ new
@@ -40,12 +40,15 @@
##
# Initial `tar` command to package the temporary backup folder.
# The command's output will then be either piped to the Encryptor
# or the Splitter (if no Encryptor), or through `cat` into the final
# output file if neither are configured.
- @pipeline << "#{ utility(:tar) } -cf - " +
- "-C '#{ Config.tmp_path }' '#{ @package.trigger }'"
+ @pipeline.add(
+ "#{ utility(:tar) } -cf - " +
+ "-C '#{ Config.tmp_path }' '#{ @package.trigger }'",
+ tar_success_codes
+ )
##
# If an Encryptor was configured, it will be called first
# to add the encryption utility command to be piped through,
# and amend the final package extension.
@@ -94,8 +97,11 @@
stack << lambda { @pipeline.run }
stack.shift
end
+ def tar_success_codes
+ gnu_tar? ? [0, 1] : [0]
+ end
end
end
end