Skip to content

Commit

Permalink
Log module loading warning to stderr
Browse files Browse the repository at this point in the history
When requesting output as JSON the warnings on stdout will prevent
loading. It also fixes a typo in occurred.
  • Loading branch information
ekohl committed Jul 1, 2024
1 parent 12d8edd commit 50e19da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hammer_cli/modules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def self.load!(name)
require_module(name)
rescue Exception => e
logger.error "Error while loading module #{name}."
puts _("Warning: An error occured while loading module %s.") % name
$stderr.puts _("Warning: An error occurred while loading module %s.") % name
# with ModuleLoadingError we assume the error is already logged by the issuer
logger.error e unless e.is_a?(HammerCLI::ModuleLoadingError)
raise e
Expand Down

0 comments on commit 50e19da

Please sign in to comment.