Use the correct paths for Emacs (fix #112)
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -18,6 +18,8 @@ use failure::{Fail, ResultExt};
|
|||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
#[cfg(windows)]
|
||||||
|
use std::path::PathBuf;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
|
|
||||||
@@ -131,7 +133,16 @@ fn run() -> Result<(), Error> {
|
|||||||
report.push_result(execute(|| unix::run_nix(run_type), opt.no_retry)?);
|
report.push_result(execute(|| unix::run_nix(run_type), opt.no_retry)?);
|
||||||
|
|
||||||
if !opt.disable.contains(&Step::Emacs) {
|
if !opt.disable.contains(&Step::Emacs) {
|
||||||
|
#[cfg(unix)]
|
||||||
git_repos.insert(base_dirs.home_dir().join(".emacs.d"));
|
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) {
|
if !opt.disable.contains(&Step::Vim) {
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ use std::io;
|
|||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Git {
|
pub struct Git {
|
||||||
git: Option<PathBuf>,
|
git: Option<PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Repositories<'a> {
|
pub struct Repositories<'a> {
|
||||||
git: &'a Git,
|
git: &'a Git,
|
||||||
repositories: HashSet<String>,
|
repositories: HashSet<String>,
|
||||||
|
|||||||
Reference in New Issue
Block a user