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

- old
+ new

@@ -92,11 +92,13 @@ private def self.read_file(git, from_git, branch, filename) if from_git - if git.branches[branch] && git.ls_tree(branch)['blob'].key?(filename) - return git.show("#{branch}:#{filename}") + begin + git.show("#{branch}:#{filename}") + rescue Git::GitExecuteError + # happens if branch does not exist end else if File.exists? filename return File.read filename end