diff --git a/lib/puppet/face/file/store.rb b/lib/puppet/face/file/store.rb index 97dbd86b4..139181b4b 100644 --- a/lib/puppet/face/file/store.rb +++ b/lib/puppet/face/file/store.rb @@ -1,21 +1,21 @@ # Store a specified file in our filebucket. Puppet::Face.define(:file, '0.0.1') do action :store do |*args| summary "Store a file in the local filebucket." arguments "" returns "Nothing." examples <<-EOT Store a file: $ puppet file store /root/.bashrc EOT when_invoked do |path, options| - file = Puppet::FileBucket::File.new(File.read(path)) + file = Puppet::FileBucket::File.new(Puppet::Util.binread(path)) Puppet::FileBucket::File.indirection.terminus_class = :file Puppet::FileBucket::File.indirection.save file file.checksum end end end