Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify user when broken symlinks are encountered #511

Merged
merged 1 commit into from
Nov 26, 2013

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Nov 25, 2013

You will now see an error message shown as well as a non zero
RC:

  $ aws s3 sync anotherdir/ s3:/bucket-name/
  [Errno 2] No such file or directory: '/private/tmp/symlnk/anotherdir/z-badsylmink'

  $ echo $?
  1

There is potential to add something like a --skip-bad-symlinks
option, but the default behavior is to let the user know that we've hit
a bad symlink. Fies #425 and #487.

@toastdriven
Copy link
Contributor

I don't understand how the _needs_newline change fits in, but otherwise everything looks fine. 🚢 it.

@jamesls
Copy link
Member Author

jamesls commented Nov 25, 2013

When there's an abnormal termination (as in the case here where we have a bad symlink), we'll hit the case where we have a 'message\r' with no newline. This means that means that the prompt will have leftover junk when the process exists. By tracking the newline we can ensure that even in abnormal termination we'll print a proper/readable error message.

You will now see an error message shown as well as a non zero
RC:

  $ aws s3 sync anotherdir/ s3://jamesls-test-sync/
  [Errno 2] No such file or directory: '/private/tmp/symlnk/anotherdir/z-badsylmink'

  $ echo $?
  1

There is potential to add something like a ``--skip-bad-symlinks``
option, but the default behavior is to let the user know that we've hit
a bad symlink.  Fies aws#425 and aws#487.
@jamesls
Copy link
Member Author

jamesls commented Nov 26, 2013

Rebased against develop.

@garnaat
Copy link
Contributor

garnaat commented Nov 26, 2013

LGTM

@jamesls jamesls merged commit 2e03640 into aws:develop Nov 26, 2013
@jamesls jamesls deleted the bad-symlink branch June 23, 2014 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants