Re:On env Shebangs
by Filligree on Saturday April 16, 2022 @04:05AM
(#31050563)
Re. 2-
If you invoke nix-shell with --pure, then it'll erase most user state — PATH included — prior to invoking the script. I don't find much use for this, but it would be useful to ensure nothing that isn't an explicit dependency gets used.
Re:On env Shebangs
by abathur on Saturday April 16, 2022 @08:56AM
(#31051934)
Yes, `--pure` helps (and `env -i` can also help) but that's not the hard part of finding them all. It only really helps when there's no conditional logic or no options that can lead to the execution of different programs.
If you invoke nix-shell with --pure, then it'll erase most user state — PATH included — prior to invoking the script. I don't find much use for this, but it would be useful to ensure nothing that isn't an explicit dependency gets used.