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

Fail the build if apt-get or curl errors #79

Merged
merged 1 commit into from
Jan 15, 2021
Merged

Commits on Jan 15, 2021

  1. Fail the build if apt-get or curl errors

    Enables the bash `pipefail` mode, which ensures that a failure in a
    command prior to a pipe correctly causes the script to exit 1.
    
    Without this, failures during the `apt-get` and `curl` invocations were
    ignored and the compile marked as a success. At best this leads to
    confusing errors in later buildpacks (if build time dependencies are
    missing), and at worst this could cause runtime failures for packages
    not used during the build, but required by the app at runtime.
    
    Enabling `pipefail` mode required a change to the custom repositories
    feature, to prevent the build exiting 1 when `grep -s -e "^:repo:"`
    found no matches (ie when no custom repositories are specified).
    
    In addition, the `--show-error` and `--fail` flags have been added to
    the `curl` call, otherwise non-HTTP 200 exit codes are ignored and the
    compile similarly marked as successful when it should not have been.
    
    Fixes #47.
    Fixes W-8722791.
    edmorley committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    0803401 View commit details
    Browse the repository at this point in the history