learn-submit 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cbf9eb5c35c2409449f25ba778255259fb696b0
4
- data.tar.gz: 910b750ba2203da073bab1e11d1a7cdcfd4e4839
3
+ metadata.gz: 3c6e48149f03bfb54310e6820077270414895335
4
+ data.tar.gz: e84921eb1d91fa3506006f00b505eaad9aa11648
5
5
  SHA512:
6
- metadata.gz: efc9e8dacb937f7e77fe47e84b21880699a6b3d23ef532388a43ae248396ea95a684aefff97fba3b26dff4c2cc48a02813e81a60be10b685bd43443c5c55fcd2
7
- data.tar.gz: e5d6e266244ed6135f80e331844baf650ae3e6fcf2bc957e17dfc88397aa2cb4d8ec77619ce957dd6f1c506e6ca111c5595d06926eae2b0d28d3e44f6cff534e
6
+ metadata.gz: 1e5e7e597aad7fdc92def23ec0a2985a4da971e13eca46299245e0990480456f7681899235dd1dc09dc75028632ed29daf0705df62e0cadf40cb7da0db61d8ed
7
+ data.tar.gz: 8aec1afbb3242eae140157b433ced52b0ea6f499617aba87dcbbbb12b929190a48a441d872503fe2ee04b4f200c9e3174f47a30be3c7be4e18593b3743c4644a
@@ -69,7 +69,14 @@ module LearnSubmit
69
69
  end
70
70
 
71
71
  def add_backup_remote
72
- git.add_remote("#{old_remote_name}-bak", old_url)
72
+ begin
73
+ git.add_remote("#{old_remote_name}-bak", old_url)
74
+ rescue Git::GitExecuteError => e
75
+ if e.message.match(/already exists/).nil?
76
+ puts "Sorry, something Git-related went wrong. Please try again."
77
+ exit
78
+ end
79
+ end
73
80
  end
74
81
 
75
82
  def remove_old_remote
@@ -1,3 +1,3 @@
1
1
  module LearnSubmit
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn-submit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flatiron School