diff --git a/src/config.rs b/src/config.rs index deafcea..1641853 100644 --- a/src/config.rs +++ b/src/config.rs @@ -98,7 +98,10 @@ impl TwitterConfig { } fn get_path_from_env(key: &str) -> Option { - env::var(key).ok().map(PathBuf::from) + env::var(key) + .ok() + .map(PathBuf::from) + .filter(|p| p.is_file()) } impl Default for YoutubeConfig {