Fixed issue where progress bar is displayed in VERBOSE mode

Added checks in the update method of the ConsoleProgressBar class to prevent it from displaying when log level is set to VERBOSE. This is to prevent cluttering the command-line interface with unnecessary information when running in VERBOSE mode. The changes also are reflected in the changelog.
This commit is contained in:
Netkas 2023-10-22 22:16:33 -04:00
parent bcc6f45eb4
commit 3ebdeb0cba
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
2 changed files with 9 additions and 0 deletions

View file

@ -14,6 +14,7 @@ This update introduces minor bug fixes.
- Improve build efficiency by preventing duplicate merges
- Updated file tracking in Runtime class
- Fixed division by zero in ConsoleProgressBar
- Fixed issue where progress bar is displayed in VERBOSE mode
## [2.0.3] - 2023-10-17

View file

@ -25,6 +25,9 @@
namespace ncc\Utilities;
use ncc\CLI\Main;
use ncc\Enums\LogLevel;
class ConsoleProgressBar
{
/**
@ -286,6 +289,11 @@
*/
public function update(): void
{
if(Resolver::checkLogLevel(LogLevel::VERBOSE, Main::getLogLevel()))
{
return;
}
if($this->auto_end && $this->value >= $this->max_value)
{
print($this->renderInformation() . $this->renderProgressBar() . "\n");