Today we use IEnvironmentActivationService to generate environment variables for activated environments. E.g. when running python code on behalf of user as a background process.
We do this today by activating the environment and capturing the environment variables.
For this we get the activation commands (using a default shell) and run it as a process.
A better approach is:
- Create a hidden terminal
- Get activation command and send to terminal
- Dump variables to text file (instead of stdout).
Solves
- unicode issues (today scraping stdout unicode)
- Activates in terminal (thats what some activation command expect, i.e. to be run within a shell).
Discussed with Karthik Nadig (@karthiknadig) (helps DAP) Pavel Minaev (@int19h) /cc
FYI - I have started some work on this.
Today we use
IEnvironmentActivationServiceto generate environment variables for activated environments. E.g. when running python code on behalf of user as a background process.We do this today by activating the environment and capturing the environment variables.
For this we get the activation commands (using a default shell) and run it as a process.
A better approach is:
Solves
Discussed with Karthik Nadig (@karthiknadig) (helps DAP) Pavel Minaev (@int19h) /cc
FYI - I have started some work on this.