From 99c4222fd06eb5348bac2937af8fcb68d6fdaafe Mon Sep 17 00:00:00 2001 From: DavidGOrtega Date: Mon, 30 May 2022 12:53:39 +0200 Subject: [PATCH] refactor ugly return --- src/cml.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cml.js b/src/cml.js index ced32b99c..90da264b5 100755 --- a/src/cml.js +++ b/src/cml.js @@ -312,8 +312,10 @@ class CML { } } + if (!log.status) return; + log.level = log.success ? 'info' : 'error'; - return log.status ? log : null; + return log; } async startRunner(opts = {}) {