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

Support for setting environment variables #10

Closed
fabiospampinato opened this issue Mar 9, 2018 · 4 comments · Fixed by #13
Closed

Support for setting environment variables #10

fabiospampinato opened this issue Mar 9, 2018 · 4 comments · Fixed by #13

Comments

@fabiospampinato
Copy link
Owner

VSC's API supports setting environment variables, we should also support them.

@M-Zuber
Copy link
Contributor

M-Zuber commented Mar 11, 2018

I'd be interested in trying to get this in, where would you suggest I start?

@fabiospampinato
Copy link
Owner Author

@M-Zuber The code could certainly be written better, but it shouldn't be too hard to add support for this. You'll basically have to:

  1. Get the env here, deconstructing a terminal's configuration object.
  2. Replace this vscode.window.createTerminal call, passing all the arguments in an object instead, as this is the only supported way to pass environment variables to the terminal instance. Read more about this here and here.
  3. Add the env object you retrieved at step 1 to the object you're passing to vscode.window.createTerminal.

That should work.

@M-Zuber
Copy link
Contributor

M-Zuber commented Mar 11, 2018

So...
In order for this to work, we will need to upgrade the engine to ^1.18.0

@fabiospampinato
Copy link
Owner Author

I think that's fine, I don't want to spend my time supporting legacy versions anyway.

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

Successfully merging a pull request may close this issue.

2 participants