image-builder: newline in error message

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
Simon de Vlieger 2025-01-18 21:38:01 +01:00 committed by Michael Vogt
parent ca0c9e63bd
commit 0eb6c5e262
2 changed files with 2 additions and 2 deletions

View file

@ -25,6 +25,6 @@ func findDistro(argDistroName, bpDistroName string) (string, error) {
if err != nil {
return "", fmt.Errorf("error deriving host distro %w", err)
}
fmt.Fprintf(osStderr, "No distro name specified, selecting %q based on host, use --distro to override", distroStr)
fmt.Fprintf(osStderr, "No distro name specified, selecting %q based on host, use --distro to override\n", distroStr)
return distroStr, nil
}

View file

@ -44,5 +44,5 @@ func TestFindDistroAutoDetect(t *testing.T) {
distro, err := main.FindDistro("", "")
assert.NoError(t, err)
assert.Equal(t, "mocked-host-distro", distro)
assert.Equal(t, `No distro name specified, selecting "mocked-host-distro" based on host, use --distro to override`, buf.String())
assert.Equal(t, "No distro name specified, selecting \"mocked-host-distro\" based on host, use --distro to override\n", buf.String())
}