-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat: add --clean-env
flag to tasks and run command
#1395
feat: add --clean-env
flag to tasks and run command
#1395
Conversation
Maybe we should call it "clean-env", or "pristine" instead of isolated, so that we don't confuse the user in case we implement stronger isolation features (aka sandboxing) |
For some reason
|
src/task/task_graph.rs
Outdated
@@ -118,6 +118,7 @@ impl<'p> TaskGraph<'p> { | |||
project: &'p Project, | |||
search_envs: &SearchEnvironments<'p, D>, | |||
args: Vec<String>, | |||
isolated: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in terms of responsibility its a bit strange that the task graph needs to be aware of isolation. Cant we default it to false
for the custom task?
|
I think I like |
--clean-env
flag to tasks and run command
Fixes prefix-dev#289 slightly Adds: ``` pixi run --clean-env xxx ``` ```toml [tasks] isolated-task = {cmd = "/usr/bin/env", clean-env = true} ``` This doesn't work on Windows, as it is just to shitty to get working on windows. You need to many variables and paths for a working environment for the label "clean" as you need the `Program Files` directories for the compilers. And other stuff. And I'm honestly a 120% Done with this PR. And it's breaking into actually being productive.
Having this additional environment isolation is super nice so thank you very much for adding it into release |
Fixes #289 slightly
Adds:
This doesn't work on Windows, as it is just to shitty to get working on windows.
You need to many variables and paths for a working environment for the label "clean" as you need the
Program Files
directories for the compilers. And other stuff.And I'm honestly a 120% Done with this PR. And it's breaking into actually being productive.