Skip to content

why CombinedOutput instead of cmd.Output? #79

@fgiloux

Description

@fgiloux

In pkg/helpers.go the RunCommand function uses cmd.CombinedOutput. I am wondering why this was chosen instead of cmd.Output.
An issue with it is that when the container engines sends warnings they are added to the result sent to the standard output and this for instance cannot be unmarshaled from json in: if err := json.Unmarshal(output, &dockerInspect); err != nil { of the same file.

This resulted in the following error message:
unable to inspect the index image: invalid character 'i' in literal true (expecting 'r')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions