From 06dd9136a253521cb74497a59f2e6894806a5b6d Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 21 Mar 2022 15:47:01 +0100 Subject: fix a number of errcheck issues Numerous issues remain, especially in tests/e2e. Signed-off-by: Valentin Rothberg --- pkg/systemd/generate/containers.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/systemd/generate/containers.go') diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go index c01bb1baf..e11aed771 100644 --- a/pkg/systemd/generate/containers.go +++ b/pkg/systemd/generate/containers.go @@ -362,7 +362,9 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst fs.StringArrayP("env", "e", nil, "") fs.String("sdnotify", "", "") fs.String("restart", "", "") - fs.Parse(remainingCmd) + if err := fs.Parse(remainingCmd); err != nil { + return "", fmt.Errorf("parsing remaining command-line arguments: %w", err) + } remainingCmd = filterCommonContainerFlags(remainingCmd, fs.NArg()) // If the container is in a pod, make sure that the -- cgit v1.2.3-54-g00ecf