Inject environment variables for subprocess #38452
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Is your feature request related to a problem? Please describe.
Using os.environ can cause issues in azure_cli.py, e.g. cannot find the
az
command even when az is on the path.Describe the solution you'd like
Inject os environment variables in to the identity module, so that we're not dependent on the global os.environ variables.
e.g. line 223 on azure_cli.py
Describe alternatives you've considered
Patching os.environ, which isn't great.
Additional context
Messy PATHs can stop the
az
command being found, despiteshutil
locating the appropriate path.The text was updated successfully, but these errors were encountered: