functionbuilder
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nathan Coad
2023-02-10 16:03:48 +11:00
parent 0e658c6360
commit 03939ec9f9
5 changed files with 19 additions and 7 deletions

View File

@@ -176,7 +176,7 @@ func runCommand0(ctx context.Context,
params.DirektivDir,
}
cmd, err := templateString(`/bin/json2excel -inputJson input.json -worksheetName "{{ .WorksheetName }}" -outputFilename '{{ .OutFilename }}'`, at)
cmd, err := templateString(`/bin/json2excel -inputJson {{- if eq (deref .Infile) "" }} "/tmp/input.json" {{- else }} {{ .Infile }} {{- end }} input.json -worksheetName "{{ .WorksheetName }}" -outputFilename '{{ .OutFilename }}'`, at)
if err != nil {
ri.Logger().Infof("error executing command: %v", err)
ir[resultKey] = err.Error()