Closed josegonzalez closed 1 year ago
Hey! Did you face this issue in your project? Could you please share, what value you passed and what error you saw?
Yeah I did. I set The coverage_file to ~/repo/backend/lcov.info
and received the following:
coveralls-linux.tar.gz: OK
Parsing args
Dry run - 0
Please specify a valid 'coverage_file' parameter. File doesn't exist. Filename: ~/repo/backend/lcov.info
Exited with code exit status 1
CircleCI received exit code 1
The file definitely exists - the upload_artifacts
step works fine with that value - but because of how the quoting works, the ~
part is treated as a literal character.
In some cases, a user might set the path to the coverage file as something like
~/coveralls.lcov
. In this case, the~
is read as part of a literal filename due to the-f
check quoting the file path, causing the orb to fail to upload the coverage file even though it doesn't exist.I think a fix would be to do something like
COVERALLS_COVERAGE_FILE="$(readlink -f "$COVERALLS_COVERAGE_FILE")"
after checking if the variable is empty but before the existence checks. I'll file a PR with this change.