Skip to content

sync with wrong object name fails but exits successfully #869

Description

@feliqarnot

When I try to sync an s3 object file with a local folder that doesn't exist, it throws an error message but still exits successfully (0 exit code).
Here are the code to reproduce :

$ s5cmd --credentials-file ~/.aws/credentials                         --profile my-profile                         --endpoint-url https://my.endpoint.url                         sync s3://source-bucket/prefix /non-existing/folder/
ERROR "sync s3://source-bucket/prefix/s3_obj /non-existing/folder/": no object found
$ echo $?
0

I would instead expect s5cmd to return a non-zero exit code when an "ERROR" happens.

Related: #824

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