Bash Uploader Syntax Fails in Ubuntu 18.04

Description

When trying to upload my project’s JaCoCo code coverage reports using the codecov bash uploader, I get a syntax error. I’m using an Ubuntu 18.04.3 environment. Does someone know the syntax for the bash uploader in Ubuntu 18.04.3?

Repository

https://codecov.io/gh/jones-chris/QueryBuilder4J/branch/add_buildspec

Versions

Ubuntu 18.04.3

Additional Information

Here are the relevant build logs:

[Container] 2020/02/02 16:40:00 Running command bash <(curl -s https://codecov.io/bash)
5200 /codebuild/output/tmp/script.sh: 4: /codebuild/output/tmp/script.sh: Syntax error: “(” unexpected
5201
5202 [Container] 2020/02/02 16:40:00 Command did not exit successfully bash <(curl -s https://codecov.io/bash) exit status 2
5203 [Container] 2020/02/02 16:40:00 Phase complete: POST_BUILD State: FAILED
5204 [Container] 2020/02/02 16:40:00 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: bash <(curl -s https://codecov.io/bash). Reason: exit status 2

Is it possibly Jenkins? Supported CI Providers

1 Like

Thanks for the suggestion @drazisil ! I tried the code in the link you provided, but it didn’t work either. I ended up getting it to work by writing the codecov bash uploader to a file and then running that file:

curl -s https://codecov.io/bash > codecov.sh
bash codecov.sh -t $CODECOV_TOKEN

I’m glad it works now :slight_smile: !!