summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-03-17 15:31:18 -0600
committermo khan <mo.khan@gmail.com>2020-03-18 10:29:40 -0600
commit8c994f165b86a2dde7315e0c53848c8827d221ee (patch)
tree87600fa03cbe6aa8ef773ab9862dfc39168f7058 /lib
parent8b3691b1e817779890af87f7709072599f83382c (diff)
Split recursive option
Diffstat (limited to 'lib')
-rw-r--r--lib/license/finder/ext/shared_helpers.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/license/finder/ext/shared_helpers.rb b/lib/license/finder/ext/shared_helpers.rb
index c3e4a46..002a20e 100644
--- a/lib/license/finder/ext/shared_helpers.rb
+++ b/lib/license/finder/ext/shared_helpers.rb
@@ -3,11 +3,15 @@ module LicenseFinder
class Cmd
def self.run(command)
stdout, stderr, status = Open3.capture3(command)
- if ENV['CI_DEBUG_TRACE'] == 'true'
- ::LicenseFinder::Core.default_logger.info(self.class, [command, stdout].join('\n'))
- end
+ debug([command, stdout].join('\n'))
[stdout, stderr, status]
end
+
+ def self.debug(message)
+ return unless ENV['CI_DEBUG_TRACE'] == 'true'
+
+ ::LicenseFinder::Core.default_logger.info(self.class, message)
+ end
end
end
end