Run fisher self-update
This commit is contained in:
@@ -189,7 +189,7 @@ fn run() -> Result<(), Error> {
|
|||||||
&mut terminal,
|
&mut terminal,
|
||||||
));
|
));
|
||||||
report.push_result(execute(
|
report.push_result(execute(
|
||||||
|terminal| unix::run_fisherman(&base_dirs, terminal, opt.dry_run),
|
|terminal| unix::run_fisher(&base_dirs, terminal, opt.dry_run),
|
||||||
&mut terminal,
|
&mut terminal,
|
||||||
));
|
));
|
||||||
report.push_result(execute(
|
report.push_result(execute(
|
||||||
|
|||||||
13
src/unix.rs
13
src/unix.rs
@@ -25,13 +25,18 @@ pub fn run_zplug(base_dirs: &BaseDirs, terminal: &mut Terminal, dry_run: bool) -
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_fisherman(base_dirs: &BaseDirs, terminal: &mut Terminal, dry_run: bool) -> Option<(&'static str, bool)> {
|
pub fn run_fisher(base_dirs: &BaseDirs, terminal: &mut Terminal, dry_run: bool) -> Option<(&'static str, bool)> {
|
||||||
if let Some(fish) = which("fish") {
|
if let Some(fish) = which("fish") {
|
||||||
if base_dirs.home_dir().join(".config/fish/functions/fisher.fish").exists() {
|
if base_dirs.home_dir().join(".config/fish/functions/fisher.fish").exists() {
|
||||||
terminal.print_separator("fisherman");
|
terminal.print_separator("fisher");
|
||||||
|
|
||||||
let success = || -> Result<(), Error> {
|
let success = || -> Result<(), Error> {
|
||||||
Executor::new(fish, dry_run)
|
Executor::new(&fish, dry_run)
|
||||||
|
.args(&["-c", "fisher self-update"])
|
||||||
|
.spawn()?
|
||||||
|
.wait()?
|
||||||
|
.check()?;
|
||||||
|
Executor::new(&fish, dry_run)
|
||||||
.args(&["-c", "fisher"])
|
.args(&["-c", "fisher"])
|
||||||
.spawn()?
|
.spawn()?
|
||||||
.wait()?
|
.wait()?
|
||||||
@@ -39,7 +44,7 @@ pub fn run_fisherman(base_dirs: &BaseDirs, terminal: &mut Terminal, dry_run: boo
|
|||||||
Ok(())
|
Ok(())
|
||||||
}().is_ok();
|
}().is_ok();
|
||||||
|
|
||||||
return Some(("fisherman", success));
|
return Some(("fisher", success));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user