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

R package tasks accumulate env vars #4953

Open
jennybc opened this issue Oct 9, 2024 · 0 comments
Open

R package tasks accumulate env vars #4953

jennybc opened this issue Oct 9, 2024 · 0 comments
Labels

Comments

@jennybc
Copy link
Member

jennybc commented Oct 9, 2024

This bit of code causes any task-specific env vars to accumulate in env and therefore carry forward to all tasks later in the list:

const env: any = {};
const pandocPath = getPandocPath();
if (pandocPath) {
env['RSTUDIO_PANDOC'] = pandocPath;
}
return taskData.map(data => {
if (data.envVars) {
Object.assign(env, data.envVars);
}

So far, none of the env vars for different tasks conflict with each other, so it's not doing any active harm. I discovered this incidentally while poking around these env vars in the debugger for other reasons. But I think it would be good to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant