nix icon indicating copy to clipboard operation
nix copied to clipboard

Add flag `set-env-var` to `MixEnvironment`, and rename old ones

Open bryanhonof opened this issue 1 year ago • 5 comments

Motivation

Closes: #11495 Closes: #10338

Context

https://github.com/NixOS/nix/pull/11490#discussion_r1757055057

Ref: #11490

Priorities and Process

Add :+1: to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

bryanhonof avatar Sep 12 '24 16:09 bryanhonof

I have another question following yours. What if the user does the following?

$ nix run --set-env-var FOO '' --unset-env-var FOO --set-env-var FOO '' ...

Since we're talking about storing it all in a map, the second appearance of --set-env-var FOO will just be ignored altogether, right? I don't believe it'd be correct to add "weight" to certain flags, so they do survive something like this, maybe throw a warning to the user they've added a duplicate flag?

bryanhonof avatar Sep 19 '24 12:09 bryanhonof

I gave the tests a go, let me know what you think.

bryanhonof avatar Sep 19 '24 16:09 bryanhonof

Apparently, also fixes one more shellcheck case from #10795.

bryanhonof avatar Sep 19 '24 17:09 bryanhonof

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-09-30-nix-team-meeting-minutes-182/53814/1

nixos-discourse avatar Oct 02 '24 20:10 nixos-discourse

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-10-09-nix-team-meeting-minutes-185/54335/1

nixos-discourse avatar Oct 14 '24 11:10 nixos-discourse

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-11-04-nix-team-meeting-minutes-191/55846/1

nixos-discourse avatar Nov 10 '24 20:11 nixos-discourse