pub fn load_env_files(env_files: Option<Vec<String>>) -> Result<(), String> {
        let env_files = match env_files {
            Some(env_files) => env_files,
            None => Vec::new(),
        };
        // Parse each of the requested environment variable files
        for env_file in env_files.iter() {
            // Load the file
            // This will be loaded for the Bonnie program, which allows us to interpolate them into commands
            let res = dotenv::from_filename(&env_file);
            if res.is_err() {
                return Err(format!("Requested environment variable file '{}' could not be loaded. Either the file doesn't exist, Bonnie doesn't have the permissions necessary to access it, or something inside it can't be processed.", &env_file));
            }
        }

        Ok(())
    }
// Loads the environment variable files requested in the config
// This is generic because it's called in caching as well
Loads the environment variable files requested in the config
This is generic because it's called in caching as well
Loads the environment variable files requested in the config This is generic because it ' s called in caching as well
pub fn load_env_files(env_files: Option<Vec<String>>) -> Result<(), String> {
        let env_files = match env_files {
            Some(env_files) => env_files,
            None => Vec::new(),
        };
        // Parse each of the requested environment variable files
        for env_file in env_files.iter() {
            // Load the file
            // This will be loaded for the Bonnie program, which allows us to interpolate them into commands
            let res = dotenv::from_filename(&env_file);
            if res.is_err() {
                return Err(format!("Requested environment variable file '{}' could not be loaded. Either the file doesn't exist, Bonnie doesn't have the permissions necessary to access it, or something inside it can't be processed.", &env_file));
            }
        }
        Ok(())
    }
pub fn load_env_files ( env_files : Option < Vec < String > > ) -> Result < ( ) , String > { let env_files = match env_files { Some ( env_files ) => env_files , None => Vec :: new ( ) , } ; // Parse each of the requested environment variable files for env_file in env_files . iter ( ) { // Load the file // This will be loaded for the Bonnie program, which allows us to interpolate them into commands let res = dotenv :: from_filename ( & env_file ) ; if res . is_err ( ) { return Err ( format ! ( " " env_file ) ) ; } } Ok ( ( ) ) }
Loads the environment variable files requested in the config
This is generic because it's called in caching as well
Loads the environment variable files requested in the config This is generic because it ' s called in caching as well
env_files
Option<Vec<String>>