source_to_env function

Source to environment