Skip to content

Commit

Permalink
Don't count colors when calculating length
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Jul 28, 2017
1 parent d5bbd9c commit 2eaa6f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Virtualmin/Config/Plugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ sub spin {
my $message = shift // "Configuring " . $name;
$message = "[" . YELLOW . $count . RESET . "/" . GREEN . $self->total() .
RESET . "] " . $message;
my $color_correction = length(YELLOW . RESET . GREEN . RESET);
$count++;
$log->info($message);
$spinner = Term::Spinner::Color->new();
Expand Down
2 changes: 1 addition & 1 deletion lib/Virtualmin/Config/Plugin/AWStats.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sub new {
my ($class, %args) = @_;

# inherit from Plugin
my $self = $class->SUPER::new(name => 'AWStats', depends => ['Apache']);
my $self = $class->SUPER::new(name => 'AWStats', depends => ['Apache'], %args);

return $self;
}
Expand Down

0 comments on commit 2eaa6f3

Please sign in to comment.