Better error model

This commit is contained in:
Roey Darwish Dror
2018-12-11 16:43:26 +02:00
parent f23b6435bf
commit 370310948b
16 changed files with 216 additions and 124 deletions

View File

@@ -1,8 +1,8 @@
use super::error::Error;
use super::executor::Executor;
use super::terminal::print_separator;
use super::utils::{which, Check, PathExt};
use directories::BaseDirs;
use failure;
use std::fs;
use std::path::PathBuf;
@@ -54,12 +54,7 @@ fn nvimrc(base_dirs: &BaseDirs) -> Option<PathBuf> {
}
#[must_use]
fn upgrade(
vim: &PathBuf,
vimrc: &PathBuf,
plugin_framework: PluginFramework,
dry_run: bool,
) -> Result<(), failure::Error> {
fn upgrade(vim: &PathBuf, vimrc: &PathBuf, plugin_framework: PluginFramework, dry_run: bool) -> Result<(), Error> {
Executor::new(&vim, dry_run)
.args(&[
"-N",