diff --git a/std/os/proc.jule b/std/os/proc.jule index f594f7a7..22f01a21 100644 --- a/std/os/proc.jule +++ b/std/os/proc.jule @@ -47,4 +47,12 @@ fn Chdir(path: str)! { if !ok { error(getLastOsError()) } +} + +// Retrieves the value of the environment variable named by the key. +// It returns the value, which will be empty if the variable is not present. +// To distinguish between an empty value and an unset value, use [LookupEnv]. +fn Getenv(key: str): str { + v, _ := LookupEnv(key) + ret v } \ No newline at end of file