Browse Source

Merge pull request #826 from jmorganca/mxyng/template-system

show: no template system if empty
Michael Yang 1 year ago
parent
commit
940e8ebec3
1 changed files with 3 additions and 0 deletions
  1. 3 0
      server/images.go

+ 3 - 0
server/images.go

@@ -951,7 +951,10 @@ func ShowModelfile(model *Model) (string, error) {
 
 
 FROM {{ .From }}
 FROM {{ .From }}
 TEMPLATE """{{ .Template }}"""
 TEMPLATE """{{ .Template }}"""
+
+{{- if .System }}
 SYSTEM """{{ .System }}"""
 SYSTEM """{{ .System }}"""
+{{- end }}
 {{ .Params }}
 {{ .Params }}
 `
 `
 	for _, l := range mt.Model.AdapterPaths {
 	for _, l := range mt.Model.AdapterPaths {