1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 16:31:47 +02:00

feat: add flag set-env-var to MixEnvironment

This commit is contained in:
Bryan Honof 2024-09-12 03:04:52 +02:00
parent 655bfa6b59
commit 0b790b4849
No known key found for this signature in database
4 changed files with 76 additions and 33 deletions

View file

@ -315,17 +315,18 @@ struct MixDefaultProfile : MixProfile
struct MixEnvironment : virtual Args {
StringSet keep, unset;
Strings stringsEnv;
std::vector<char*> vectorEnv;
StringSet keepVars;
StringSet unsetVars;
std::map<std::string, std::string> setVars;
bool ignoreEnvironment;
MixEnvironment();
/***
* Modify global environ based on `ignoreEnvironment`, `keep`, and
* `unset`. It's expected that exec will be called before this class
* goes out of scope, otherwise `environ` will become invalid.
* Modify global environ based on `ignoreEnvironment`, `keep`,
* `unset`, and `added`. It's expected that exec will be called
* before this class goes out of scope, otherwise `environ` will
* become invalid.
*/
void setEnviron();
};