aws / aws/aws-cli

Non zero RC for S3 sync even if file is excluded

Open
#1,117 7 comments 1 reaction 0 assignees View on GitHub
automation-exempt bug p2 s3 s3filters s3sync
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

A file that would is `--exclude`'d should not trigger a non zero RC if we can't read the file. For example:

```
/tmp $ mkdir demo
/tmp $ mkfifo demo/bad
/tmp $ touch demo/good
/tmp $ aws s3 sync demo/ s3://bucket/demo/ --exclude '*' --dryrun
warning: Skipping file /private/tmp/demo/bad. File is character special device, block special device, FIFO, or socket.
Completed 0 part(s) with ... file(s) remaining
/tmp $ echo $?
2
```

Given that `/tmp/demo/bad` was never going to be transferred in the first place (because it's been excluded via `--exclude '*'`, it seems odd that this will trigger a non zero RC. I'd expect the RC to be 0 here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.