It's easy to have xsltproc failing to process the XML from a libvirt terraform configuration. Indeed, syntax error will trigger such failure, and a bad terraform configuration where xslt= property is confused as file path instead of content would likely generate syntax errors:
Currently, when xsltproc fails, with TF_LOG=1, the following is displayed:
2023-02-21T14:00:35.620+0100 [INFO] provider.terraform-provider-libvirt: 2023/02/21 14:00:35 [ERROR] Failed to run xsltproc (is it installed?): timestamp=2023-02-21T14:00:35.620+0100
Which is confusing when xsltproc is available. With this patch and TF_LOG=1, the following would be displayed:
2023-02-21T14:00:35.620+0100 [INFO] provider.terraform-provider-libvirt: 2023/02/21 14:00:35 [ERROR] Failed to run xsltproc (is it installed?): timestamp=2023-02-21T14:00:35.620+0100
2023-02-21T14:00:35.620+0100 [INFO] provider.terraform-provider-libvirt: 2023/02/21 14:00:35 [ERROR] Error: {/tmp/terraform-provider-libvirt-xslt1179436507:1: parser error : Start tag expected, '<' not found
transform.xslt
^
It's easy to have xsltproc failing to process the XML from a libvirt terraform configuration. Indeed, syntax error will trigger such failure, and a bad terraform configuration where xslt= property is confused as file path instead of content would likely generate syntax errors:
Currently, when xsltproc fails, with TF_LOG=1, the following is displayed:
Which is confusing when xsltproc is available. With this patch and TF_LOG=1, the following would be displayed:
Refs #999
Please make sure you read the contributor documentation before opening a Pull Request.