Skip to content

Should freight-add exit non-zero in case package is already present? #59

@antaflos

Description

@antaflos

Running freight-add on a package that already exists in the library exits with an informative (error?) message but with exit code 0:

$ freight-add foobar_0.9.0_amd64.deb apt/precise
# [freight] apt/precise already has foobar_0.90.0_amd64.deb
$ echo $?
0

Shouldn't it exit with 1 or another non-zero value so that one doesn't have to rely on parsing the message in order to find out what freight-add actually did?

I understand that the end result of running freight-add is always that a package is present in the library (i.e. /var/lib/freight) but when scripting a package deployment process it'd be nice to be able to easily fail when the script tries to add a package that already exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions