Enable debug mode when PRODUCER_DEBUG is set

This commit is contained in:
Thibault Jouan
2015-04-06 13:49:44 +00:00
parent bd754f2bf6
commit 2b0e62be26
3 changed files with 16 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ module Producer
ARGUMENTS_SEPARATOR = '--'.freeze
ENV_VERBOSE_KEY = 'PRODUCER_VERBOSE'.freeze
ENV_DEBUG_KEY = 'PRODUCER_DEBUG'.freeze
class << self
def run!(arguments, stdin: $stdin, stdout: $stdout, stderr: $stderr)
@@ -73,6 +74,7 @@ module Producer
def configure_environment!(environment)
@env.verbose = true if environment.key? ENV_VERBOSE_KEY
@env.debug = true if environment.key? ENV_DEBUG_KEY
end
def split_arguments_lists(arguments)