getEnv now supports a 'default' parameter; refs #6019
This commit is contained in:
parent
a155130cf2
commit
0895064983
5 changed files with 12 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue