Skip to content
Browse files

Merge branch 'hotfix-1.0.2.9'

  • Loading branch information...
2 parents 6a331c4 + 3a6347a commit fa5c94e1adb5f1f2f8fbcaf829917c2c58a2de5f @jeffWelling committed
Showing with 18 additions and 10 deletions.
  1. +17 −9 lib/ticgit-ng/command/sync.rb
  2. +1 −1 lib/ticgit-ng/version.rb
View
26 lib/ticgit-ng/command/sync.rb
@@ -14,15 +14,23 @@ def parser(opts)
end
def execute
- if options.repo and options.no_push
- tic.sync_tickets(options.repo, false)
- elsif options.repo
- tic.sync_tickets(options.repo)
- elsif options.no_push
- tic.sync_tickets('origin', false)
- else
- tic.sync_tickets()
- end
+ begin
+ if options.repo and options.no_push
+ tic.sync_tickets(options.repo, false)
+ elsif options.repo
+ tic.sync_tickets(options.repo)
+ elsif options.no_push
+ tic.sync_tickets('origin', false)
+ else
+ tic.sync_tickets()
+ end
+ rescue Git::GitExecuteError => e
+ if e.message[/does not appear to be a git repository/]
+ repo= e.message.split("\n")[0][/^[^:]+/][/"\w+"/].gsub('"','')
+ puts "Could not sync because git returned the following error:\n#{e.message.split("\n")[0][/[^:]+$/].strip}"
+ exit
+ end
+ end
end
end
end
View
2 lib/ticgit-ng/version.rb
@@ -1,3 +1,3 @@
module TicGitNG
- VERSION = '1.0.2.8'
+ VERSION = '1.0.2.9'
end

0 comments on commit fa5c94e

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