HenrikBengtsson / startup

:wrench: R package: startup - Friendly R Startup Configuration
https://henrikbengtsson.github.io/startup/
163 stars 5 forks source link

<key>!=<value> when 'key' is undefined #70

Closed HenrikBengtsson closed 5 years ago

HenrikBengtsson commented 5 years ago

Background

We currently have:

Any further <key>=<value> specifications with keys matching none of the above known keys are interpreted as system environment variables and startup will test such conditions against their values. Note, if <key> does not correspond to a known environment variable, then the file is skipped.

This is useful when, for instance, starting R with a set of secret environment variables set;

$ SECRET=banana R

This will only process startup files that has SECRET=banana is their path names.

Suggestion

Analogously to the above, it would be useful to be able to specify that a set of files should be processed if a certain key has a value different from specific one and unless it is defined. For example,

$ R_CHECK_STRICT=FALSE R

could be used to not process:

~/.Renviron.d/strict,R_CHECK_STRICT!=FALSE