mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Fix stutters
Podman adds an Error: to every error message. So starting an error message with "error" ends up being reported to the user as Error: error ... This patch removes the stutter. Also ioutil.ReadFile errors report the Path, so wrapping the err message with the path causes a stutter. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -491,7 +491,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
|
||||
// template execution.
|
||||
templ, err := template.New("container_template").Delims("{{{{", "}}}}").Parse(containerTemplate)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error parsing systemd service template: %w", err)
|
||||
return "", fmt.Errorf("parsing systemd service template: %w", err)
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
@ -502,7 +502,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
|
||||
// Now parse the generated template (i.e., buf) and execute it.
|
||||
templ, err = template.New("container_template").Delims("{{{{", "}}}}").Parse(buf.String())
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error parsing systemd service template: %w", err)
|
||||
return "", fmt.Errorf("parsing systemd service template: %w", err)
|
||||
}
|
||||
|
||||
buf = bytes.Buffer{}
|
||||
|
Reference in New Issue
Block a user