Skip to content

freight cache does not fail if dpkg-deb fails #141

@JC3

Description

@JC3

When executing freight cache, if a dpkg-deb call fails, freight cache still returns success.

For example, when attempting to use freight to add a .deb file that uses zstd compression on a system that does not support zstd compression:

freight cache ; echo $?

Fails and outputs:

dpkg-deb: error: archive '/var/lib/freight/apt/test/adsys_0.9.2~22.04.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
# [freight] skipping invalid Debian package adsys_0.9.2~22.04.1_amd64.deb
0

Note that it still returns 0.

Expected behavior: If freight cache fails for some reason, it should return non-zero to the OS.
Actual behavior: freight cache exits with 0 even on failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions