Skip to content

Commit

Permalink
Merge pull request chef-boneyard#570 from steversmith/unix_machine_pr
Browse files Browse the repository at this point in the history
add digest command to unix_machine.files_different?
  • Loading branch information
tyler-ball authored Jun 27, 2017
2 parents 771a73c + 56c73cc commit 5e40fab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/chef/provisioning/machine/unix_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def files_different?(path, local_path, content=nil)
result = transport.execute("md5sum -b #{path}", :read_only => true)
unless result.exitstatus == 0
result = transport.execute("md5 -r #{path}", :read_only => true)
unless result.exitstatus == 0
result = transport.execute("digest -a md5 #{path}", :read_only => true)
end
end
result.error!
remote_sum = result.stdout.split(' ')[0]
Expand Down

0 comments on commit 5e40fab

Please sign in to comment.