fix for MIB download through proxy

This commit is contained in:
Oliver Gorwits
2017-04-24 14:43:03 +01:00
parent cb9a24ed51
commit f439241c9f
3 changed files with 9 additions and 1 deletions

View File

@@ -281,7 +281,7 @@ sub deploy_mibs {
my $latest = 'https://github.com/netdisco/netdisco-mibs/releases/latest';
my $resp = HTTP::Tiny->new->get($latest);
if (exists $resp->{redirects} and $resp->{url} =~ m/([0-9.]+)$/) {
if ($resp->{url} =~ m/([0-9.]+)$/) {
my $ver = $1;
my $url = 'https://codeload.github.com/netdisco/netdisco-mibs/tar.gz/'. $ver;
my $file = file($home, 'netdisco-mibs-latest.tar.gz');