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

codecov unable to find coverage on PATH because env is not inherited #66

Closed
alex opened this issue Mar 22, 2020 · 0 comments
Closed

codecov unable to find coverage on PATH because env is not inherited #66

alex opened this issue Mar 22, 2020 · 0 comments

Comments

@alex
Copy link
Contributor

alex commented Mar 22, 2020

I'm currently facing an issue where codecov cannot find the Python coverage program on the PATH, and therefore does not process the coverage. I believe this is because of how index.js here manages the environ.

Specifically, it fully overrides it:

codecov-action/index.js

Lines 52 to 59 in a3a6bec

options.env = {
GITHUB_ACTION: process.env.GITHUB_ACTION,
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
GITHUB_REF: process.env.GITHUB_REF,
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
GITHUB_SHA: process.env.GITHUB_SHA,
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || ''
};

Based on reading the exec package's source, it's clear that this is the entire env provided, it is not merged with process.env.

I think the best way to handle this would be to merge these vars with process.env. At the very least, PATH needs to be inherited so tools can be found, otherwise you simply get the system default PATH.

thomasrockhu added a commit that referenced this issue May 6, 2020
Fixes #66 -- include the current env when invoking the subprocess
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