Use the correct paths for Emacs (fix #112)

This commit is contained in:
Roey Darwish Dror
2019-01-27 20:04:46 +02:00
parent 71558e6bdb
commit df27021277
2 changed files with 13 additions and 0 deletions

View File

@@ -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) {