Skip to content

Commit

Permalink
🐛 Verbosity handling bug
Browse files Browse the repository at this point in the history
- Ensured the correct verbosity is returned and avoided unnecessary processing
  • Loading branch information
mkarlesky committed Aug 19, 2024
1 parent 69391cd commit 8865262
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/cli_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 8865262

Please sign in to comment.