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

Option to Inherit VSCode Window Environment #108

Open
CS-Account opened this issue Oct 26, 2024 · 1 comment
Open

Option to Inherit VSCode Window Environment #108

CS-Account opened this issue Oct 26, 2024 · 1 comment

Comments

@CS-Account
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I would like to run a script upon each save with the environment that VSCode has already inherited. This would enable a user to run any command they would manually run in the terminal without having to figure out the specifics of setting up the environment with every run.

Describe the solution you'd like
I imagine that something like the VSCode API Terminal class could help achieve this with the strictEnv?: boolean terminal option being of interest in particular, enabling the user to choose whether to inherit from the window's environment or create an environment solely from the env option.

Additional context
I believe this may also solve issues such as #106 and #62

Implementation from the viewpoint of the config might look like the addition of a boolean configuration option to enable or disable strictEnv, enabling by default as to not modify the behavior of the extension for existing configurations and users.

@bmingles
Copy link
Member

@CS-Account I’ve considered using terminal apis as well, but I think it will need to be implemented as an opt in feature to avoid breaking existing users. Namely some users may not want an additional terminal to show up. Also makes me a bit nervous that it may behave differently depending on the backing shell, specific commands, etc. vs the node child_process exec apis currently used.

That said, I do like the idea of having it as an option. I just mention this as part of requirements in case you were inclined to submit a PR

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

No branches or pull requests

2 participants