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

Propagate failure if upload is truncated #21

Closed
jmandel opened this issue Jun 16, 2022 · 0 comments
Closed

Propagate failure if upload is truncated #21

jmandel opened this issue Jun 16, 2022 · 0 comments

Comments

@jmandel
Copy link
Collaborator

jmandel commented Jun 16, 2022

See discussion at https://chat.fhir.org/#narrow/stream/179165-committers/topic/Build.2Efhir.2Eorg.20is.20gone.3F/near/286425705

Explanation: https://unix.stackexchange.com/questions/312631/bash-script-with-set-e-doesnt-stop-on-command

In

tar xzf - && date --iso-8601 > ~/uploading/$TARGET/done.txt

And in

tar xzf - && date --iso-8601 > ~/uploading/$TARGET/done.txt

tar xzf - && date --iso-8601 > ~/uploading/$TARGET/done.txt

... the use of && with set -e means the script doesn't actually stop here if the upload is truncated.

The fix is to do

    tar xzf - && date --iso-8601 > ~/uploading/$TARGET/done.txt || false
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

No branches or pull requests

1 participant