diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 7196c3b3..57dbde4a 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -170,7 +170,7 @@ __debug:: If this variable is setup, cdist runs in debug mode. You can use this information, to only output stuff in debug mode as well. - Available for: initial manifest, type manifest + Available for: initial manifest, type manifest, gencode, code __explorer:: Directory that contains all global explorers. Available for: explorer diff --git a/lib/cdist/core/code.py b/lib/cdist/core/code.py index e81f7954..0f2591b3 100644 --- a/lib/cdist/core/code.py +++ b/lib/cdist/core/code.py @@ -92,6 +92,9 @@ class Code(object): '__global': self.local.out_path, } + if log.getEffectiveLevel() == logging.DEBUG: + self.env.update({'__debug': "yes" }) + def _run_gencode(self, cdist_object, which): cdist_type = cdist_object.type script = os.path.join(self.local.type_path, getattr(cdist_type, 'gencode_%s_path' % which))