Provide an API to return the custom environments variables #20621
Labels
area-environments
Features relating to handling interpreter environments
feature-request
Request for new features or functionality
info-needed
Issue requires more information from poster
needs proposal
Need to make some design decisions
partner ask
The current API
getEnvironmentVariables
does not return just the custom variables, it returns the resolved environment variables. My assumption was that this returns just the custom env variables.The Jupyter extension needs a way to get just the custom env variables (not all of the env variables from the process)
E.g. if there is no .env file, then
undefined
would be returned, if there is just one env variable in the env file, then we get back a JS object with just that key and the corresopnding value.This is required as we need to merge these with the activated environment variables
E.g.g assume we want to run Python, then we get the activated env variables for an env, then we merge that with the custom env variables. However this is no longer possible as the custom env variables contains everything (as I assumed the api would return only the custom vars).
The merging needs to happen in Jupyter extension as users could have a kernel spec that has custom env variables as well,
& the Jupyter extension today merges the env variables from the following 3 sources:
Happy to have a chat about this.
The text was updated successfully, but these errors were encountered: