Skip to content

Commit

Permalink
Maybe fix total
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Jul 28, 2017
1 parent 50ca5e1 commit d641259
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/Virtualmin/Config/Plugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,19 @@ sub depends {
return $self->{depends};
}

# Total number of plugins being run for running count
sub total {
my ($self, $total) = @_;
if ($total) { $self->{total} = shift }
returnn $self->{total};
}

sub spin {
my $self = shift;
my $name = $self->name();
my $total = $self->total();
my $message = shift // "Configuring " . $name;
$message = "[" . YELLOW . $count . RESET . "/" . GREEN . $self->{total} .
$message = "[" . YELLOW . $count . RESET . "/" . GREEN . $total .
RESET . "] " . $message;
$count++;
$log->info($message);
Expand Down

0 comments on commit d641259

Please sign in to comment.