Skip to content

Commit

Permalink
Fix devenv up with the impure option
Browse files Browse the repository at this point in the history
Only pass the `--impure` option to the modern nix command that supports
it.
  • Loading branch information
sandydoo committed Apr 3, 2024
1 parent 99f93f7 commit bdcb457
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion devenv/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ impl App {
};

if self.cli.impure || self.config.impure {
flags.push("--impure");
// only pass the impure option to the nix command that supports it.
// avoid passing it to the older utilities, e.g. like `nix-store` when creating GC roots.
if command == "nix" {
flags.push("--impure");
}
// set a dummy value to overcome https://github.com/NixOS/nix/issues/10247
cmd.env("NIX_PATH", ":");
}
Expand Down

0 comments on commit bdcb457

Please sign in to comment.