From 886526236e1f179946f671a1410d93d7e28d33f8 Mon Sep 17 00:00:00 2001 From: Michael Karlesky Date: Mon, 19 Aug 2024 09:57:38 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Verbosity=20handling=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ensured the correct verbosity is returned and avoided unnecessary processing --- bin/cli_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cli_helper.rb b/bin/cli_helper.rb index 186333cd..1cd79f66 100644 --- a/bin/cli_helper.rb +++ b/bin/cli_helper.rb @@ -231,6 +231,9 @@ def run_rake_tasks(tasks) # Set global consts for verbosity and debug def set_verbosity(verbosity=nil) + # If we have already set verbosity, there's nothing to do here + return PROJECT_VERBOSITY if @system_wrapper.constants_include?('PROJECT_VERBOSITY') + verbosity = if verbosity.nil? Verbosity::NORMAL elsif verbosity.to_i.to_s == verbosity @@ -241,9 +244,6 @@ def set_verbosity(verbosity=nil) raise "Unkown Verbosity '#{verbosity}' specified" end - # If we already set verbosity, there's nothing more to do here - return verbosity if Object.const_defined?('PROJECT_VERBOSITY') - # Create global constant PROJECT_VERBOSITY Object.module_eval("PROJECT_VERBOSITY = verbosity") PROJECT_VERBOSITY.freeze()