summaryrefslogtreecommitdiff
path: root/lib/license/management/shell.rb
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-07-20 15:55:59 -0600
committermo khan <mo.khan@gmail.com>2020-07-21 16:46:02 -0600
commitb3faccb3e3007ddfd41ef251ad8a925542fe2500 (patch)
treec2389439b9d41193079daf29a7bb82b6127e1e88 /lib/license/management/shell.rb
parente1bb260b43763a36536b7d3fa4d73108ffb604d4 (diff)
Update maven/gradle offline tests
* Let maven figure out the version of the license plugin that it is compatible with * Print the error when the setup fails * Add tests for multiple versions of maven and java * Install packages into a project specific directory to prevent cross test pollution * Specify the list of supported Maven versions * Update CHANGELOG and bump the version
Diffstat (limited to 'lib/license/management/shell.rb')
-rw-r--r--lib/license/management/shell.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/license/management/shell.rb b/lib/license/management/shell.rb
index 408c760..47639df 100644
--- a/lib/license/management/shell.rb
+++ b/lib/license/management/shell.rb
@@ -79,14 +79,13 @@ module License
end
def record(stdout, stderr, status)
- logger.debug(stdout) if present?(stdout)
- return unless present?(stderr)
+ severity = status.success? ? Logger::DEBUG : Logger::ERROR
+ flush(stdout, severity)
+ flush(stderr, severity)
+ end
- if status.success?
- logger.debug(stderr)
- else
- logger.error(stderr)
- end
+ def flush(message, severity)
+ logger.add(severity, message) if present?(message)
end
def collapsible_section(header)