From b61cadf12383ad6c2bb9034bdbee0390e41e4767 Mon Sep 17 00:00:00 2001 From: Ahmon Dancy Date: Fri, 17 Apr 2020 11:04:25 -0700 Subject: [PATCH] Log useful error message if xsltproc cannot be executed transformXML requires the xsltproc executable but will fail silently if it does not exist. This commit makes it log a message when that happens to help guide the user. --- libvirt/utils_xslt.go | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt/utils_xslt.go b/libvirt/utils_xslt.go index 6b7aa5822..27614ab5b 100644 --- a/libvirt/utils_xslt.go +++ b/libvirt/utils_xslt.go @@ -89,6 +89,7 @@ func transformXML(xml string, xslt string) (string, error) { xmlFile.Name()) transformedXML, err := cmd.Output() if err != nil { + log.Printf("[ERROR] Failed to run xsltproc (is it installed?)") return xml, err } log.Printf("[DEBUG] Transformed XML with user specified XSLT:\n%s", transformedXML)