Skip to content

Commit

Permalink
curRelease: guard against missing channel
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Apr 13, 2020
1 parent ed29118 commit 945aa8a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mirror-nixos-branch.pl
Expand Up @@ -112,6 +112,12 @@ sub fetch {

if ($bucketChannels) {
# Guard against the channel going back in time.
my $curRelease = "";
my $object = $bucketChannels->get_key($channelName);
if (defined($object)) {
$curRelease = $object->{'x-amz-website-redirect-location'} // "";
}

my $curRelease = $bucketChannels->get_key($channelName)->{'x-amz-website-redirect-location'} // "";
if (!defined $ENV{'FORCE'}) {
print STDERR "previous release is $curRelease\n";
Expand Down

0 comments on commit 945aa8a

Please sign in to comment.