checkEnv#

Check the existence and, optionally, the value of an environment variable.

Parameters

checkEnv: str
Environment variable to check, wrapped in curly braces for substitution
aliases: checkEnv, CheckEnv
regex: str (Optional)
A regular expression to check against the environment variable value
desc: str (Optional)

The description for the check

substitute: bool (Optional)
Whether to substitute environment variables in check values
default: True
aliases: substitute, env_substitute

The checkEnv check in YAML format.

checks:
  Environment:
    Username:
      desc: The current username
      checkEnv: "$USER"
      regex: "[a-z_][a-z0-9_-]*[$]?"

The checkEnv check in TOML format.

[checks.Environment.Username]
desc = "The current username"
checkEnv = "$USER"
regex = "[a-z_][a-z0-9_-]*[$]?"

The checkEnv check in abbreviated TOML format.

[checks.Environment]
Username = {checkEnv = "{USER}", regex = "[a-z_][a-z0-9_-]*[$]?"}