Skip to content
Browse files

Clearer error messages

  • Loading branch information...
1 parent fa06240 commit fe5f0df9f3e92441a01efa929cd2f895558fe7b4 @sunny committed Dec 23, 2008
Showing with 4 additions and 3 deletions.
  1. +4 −3 git-ics.rb
View
7 git-ics.rb
@@ -45,9 +45,10 @@ def to_ical
dir = ARGV.first || ""
begin
puts GitIcs.new(dir).to_ical
- rescue Grit::NoSuchPathError, Grit::InvalidGitRepositoryError
- abort "#{$0}: #{File.expand_path(dir)} is an invalid git directory\n" + \
- "Usage: #{$0} directory"
+ rescue Grit::NoSuchPathError
+ abort "#{$0}: No such path #{File.expand_path(dir)}"
+ rescue Grit::InvalidGitRepositoryError
+ abort "#{$0}: #{File.expand_path(dir)} is not a git repository"
end
end

0 comments on commit fe5f0df

Please sign in to comment.
Something went wrong with that request. Please try again.