mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
* Builtin function `getEnv' for getting environment variables.
This commit is contained in:
parent
df8873e14a
commit
e47e0c2dbe
4 changed files with 22 additions and 6 deletions
|
@ -1,5 +1,7 @@
|
|||
source common.sh
|
||||
|
||||
export TEST_VAR=foo # for eval-okay-getenv.nix
|
||||
|
||||
fail=0
|
||||
|
||||
for i in lang/parse-fail-*.nix; do
|
||||
|
|
1
tests/lang/eval-okay-getenv.exp
Normal file
1
tests/lang/eval-okay-getenv.exp
Normal file
|
@ -0,0 +1 @@
|
|||
Str("foobar")
|
1
tests/lang/eval-okay-getenv.nix
Normal file
1
tests/lang/eval-okay-getenv.nix
Normal file
|
@ -0,0 +1 @@
|
|||
builtins.getEnv "TEST_VAR" + (if builtins.getEnv "NO_SUCH_VAR" == "" then "bar" else "bla")
|
Loading…
Add table
Add a link
Reference in a new issue