diff --git a/pre_commit_hooks/terraform_inputs_jenkins_pipeline_params.py b/pre_commit_hooks/terraform_inputs_jenkins_pipeline_params.py index 5517abd..35dffd7 100644 --- a/pre_commit_hooks/terraform_inputs_jenkins_pipeline_params.py +++ b/pre_commit_hooks/terraform_inputs_jenkins_pipeline_params.py @@ -19,7 +19,7 @@ def get_terraform_input_vars(terraform_files): try: - raw_json = subprocess.check_output(['terraform-docs', '--no-sort', '--with-aggregate-type-defaults', 'json', ' '.join(terraform_files)]) + raw_json = subprocess.check_output(['terraform-docs', '--no-sort', '--with-aggregate-type-defaults', 'json'] + terraform_files) except subprocess.CalledProcessError: raw_json = '{ "Inputs": [] }'