clhodapp / nix-runner

Tidy shell shebangs with nix flakes
GNU Affero General Public License v3.0
45 stars 3 forks source link

Pure as default? #1

Open manveru opened 2 years ago

manveru commented 2 years ago

Is there any reason that impure is the default right now? I'd think that the reverse should be the case, since you probably want purity if you use this project in the first place.

clhodapp commented 2 years ago

This would be my preference too but it seems kind of complex to do while the implementation is a simple sed processor. Right now, I essentially turn #!pure into an --unset PATH flag for nix shell in the runner. It's a lot harder to have magic comments remove flags from nix shell than to add them. I do really want to keep the option of preserving PATH because just blindly clearing it is over-limiting in my experience.