diff --git a/src/main.rs b/src/main.rs index 4a1f8b0f..7992d586 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,6 +18,8 @@ use failure::{Fail, ResultExt}; use std::borrow::Cow; use std::env; use std::io; +#[cfg(windows)] +use std::path::PathBuf; use std::process::exit; use structopt::StructOpt; @@ -131,7 +133,16 @@ fn run() -> Result<(), Error> { report.push_result(execute(|| unix::run_nix(run_type), opt.no_retry)?); if !opt.disable.contains(&Step::Emacs) { + #[cfg(unix)] git_repos.insert(base_dirs.home_dir().join(".emacs.d")); + + #[cfg(windows)] + { + git_repos.insert(base_dirs.data_dir().join(".emacs.d")); + if let Ok(home) = env::var("HOME") { + git_repos.insert(PathBuf::from(home).join(".emacs.d")); + } + } } if !opt.disable.contains(&Step::Vim) { diff --git a/src/steps/git.rs b/src/steps/git.rs index badf113b..8c22be52 100644 --- a/src/steps/git.rs +++ b/src/steps/git.rs @@ -8,10 +8,12 @@ use std::io; use std::path::{Path, PathBuf}; use std::process::Command; +#[derive(Debug)] pub struct Git { git: Option, } +#[derive(Debug)] pub struct Repositories<'a> { git: &'a Git, repositories: HashSet,