mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 09:14:00 +00:00
getEnv now supports a 'default' parameter; refs #6019
This commit is contained in:
@@ -106,7 +106,7 @@ proc cmpic*(a, b: string): int =
|
||||
## Compares `a` and `b` ignoring case.
|
||||
cmpIgnoreCase(a, b)
|
||||
|
||||
proc getEnv*(key: string): string {.tags: [ReadIOEffect].} =
|
||||
proc getEnv*(key: string; default = ""): string {.tags: [ReadIOEffect].} =
|
||||
## Retrieves the environment variable of name `key`.
|
||||
builtin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user