codecov / codecov-bash

Global coverage report uploader for Codecov
https://codecov.io
Apache License 2.0
234 stars 155 forks source link

codecov-bash exits zero on 400 error #443

Open elashpear opened 3 years ago

elashpear commented 3 years ago

Running bash <(curl -s https://codecov.io/bash) can result in the following error:

Could not determine repo and owner
400

In this case, the script exits zero and CI is unable to detect the failure. The script should exit nonzero when encountering a fatal error submitting the coverage report, as indicated by the README.

Full log is below:

$ bash <(curl -s https://codecov.io/bash)

  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-1.0.3

==> git version 2.30.1 found
==> curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets
x> No CI provider detected.
    Testing inside Docker? http://docs.codecov.io/docs/testing-with-docker
    Testing with Tox? https://docs.codecov.io/docs/python#section-testing-with-tox
    project root: .
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Processing Xcode reports via llvm-cov
    DerivedData folder: /Users/eliot/Library/Developer/Xcode/DerivedData
    -> No Swift coverage found
    -> Running gcov for Obj-C
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 3 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./coverage/clover.xml bytes=464046
    + ./coverage/lcov.info bytes=214005
    + ./coverage/coverage-final.json bytes=1358491
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
        224K    /tmp/codecov.OB6GRV.gz
==> Uploading reports
    url: https://codecov.io
    query: branch=WB-2226-add-feature-flag-for-integrating-weaver-and-hylia-web&commit=bd7ac799becd3f94ddd7730c70801a962a5e6cd6&build=&build_url=&name=&tag=&slug=peartherapeutics%2Fweaver&service=&flags=&pr=&job=&cmd_args=
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-1.0.3&token=secret&branch=WB-2226-add-feature-flag-for-integrating-weaver-and-hylia-web&commit=bd7ac799becd3f94ddd7730c70801a962a5e6cd6&build=&build_url=&name=&tag=&slug=peartherapeutics%2Fweaver&service=&flags=&pr=&job=&cmd_args=
Could not determine repo and owner
400