Run commands only when a given environment variable is set