setenv-0.1.1.3: A cross-platform library for setting environment variables
Safe HaskellSafe
LanguageHaskell98

System.SetEnv

Synopsis

Documentation

setEnv :: String -> String -> IO () Source #

setEnv name value sets the specified environment variable to value.

Early versions of this function operated under the mistaken belief that setting an environment variable to the empty string on Windows removes that environment variable from the environment. For the sake of compatibility, it adopted that behavior on POSIX. In particular

setEnv name ""

has the same effect as

unsetEnv name

If you'd like to be able to set environment variables to blank strings, use setEnv.

Throws IOException if name is the empty string or contains an equals sign.

Since: base-4.7.0.0

unsetEnv :: String -> IO () Source #

unsetEnv name removes the specified environment variable from the environment of the current process.

Throws IOException if name is the empty string or contains an equals sign.

Since: base-4.7.0.0