lib/gurney/cli.rb in gurney_client-0.1.2 vs lib/gurney/cli.rb in gurney_client-0.1.3

- old
+ new

@@ -84,18 +84,18 @@ rescue Gurney::Error => e puts "Gurney: error".red puts e.message.red rescue Exception => e puts "Gurney: an unexpected error occurred".red - puts "#{e.full_message}" + raise end end private def self.read_file(git, from_git, branch, filename) if from_git - if git.ls_tree(branch)['blob'].key?(filename) + if git.branches[branch] && git.ls_tree(branch)['blob'].key?(filename) return git.show("#{branch}:#{filename}") end else if File.exists? filename return File.read filename