summaryrefslogtreecommitdiffstats
path: root/bin/git
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-02-13 23:06:53 -0600
committerJesse Luehrs <doy@tozt.net>2012-02-13 23:07:18 -0600
commit203cf1802dc22bc0263f2af113b13ff463564fc3 (patch)
tree2ebace6aec7e0e567f69794973c1b09617efae87 /bin/git
parent90677e4e9e742a01dfca62d16d7ba077fc48eae3 (diff)
downloadconf-203cf1802dc22bc0263f2af113b13ff463564fc3.tar.gz
conf-203cf1802dc22bc0263f2af113b13ff463564fc3.zip
better error reporting for git-hub
Diffstat (limited to 'bin/git')
-rwxr-xr-xbin/git/git-hub11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/git/git-hub b/bin/git/git-hub
index 953aa9c..86c7955 100755
--- a/bin/git/git-hub
+++ b/bin/git/git-hub
@@ -91,13 +91,9 @@ sub run_command_delete {
warn "not actually deleting $name (-f not set)\n" unless $force;
- my $response = $self->_github(repo => $name)->repos->delete(
+ $self->_github(repo => $name)->repos->delete(
$force ? ({confirm => 1}) : ()
);
-
- if ($response->{error}) {
- die "error deleting repository $name: $response->{error}\n";
- }
}
sub run_command_fork {
@@ -237,4 +233,7 @@ sub _github {
package main;
-App::Git::Hub->new(@ARGV)->run;
+my $res = App::Git::Hub->new(@ARGV)->run;
+if (ref($res) eq 'HASH' && exists $res->{error}) {
+ die $res->{error}[0], "\n";
+}