lib/cms_scanner.rb in cms_scanner-0.0.40.3 vs lib/cms_scanner.rb in cms_scanner-0.0.41.0

- old
+ new

@@ -143,11 +143,12 @@ @run_error = e formatter.output('@scan_aborted', reason: e.is_a?(Interrupt) ? 'Canceled by User' : e.message, trace: e.backtrace, - verbose: controllers.first.parsed_options[:verbose]) + verbose: controllers.first.parsed_options[:verbose] || + run_error_exit_code == NS::ExitCode::EXCEPTION) ensure Browser.instance.hydra.abort formatter.beautify end @@ -182,10 +183,12 @@ return NS::ExitCode::CLI_OPTION_ERROR if run_error.is_a?(OptParseValidator::Error) || run_error.is_a?(OptionParser::ParseError) return NS::ExitCode::INTERRUPTED if run_error.is_a?(Interrupt) - NS::ExitCode::ERROR + return NS::ExitCode::ERROR if run_error.is_a?(NS::Error) + + NS::ExitCode::EXCEPTION end end end require "#{CMSScanner::APP_DIR}/app"