From 46b44b3e4a99d9e35e845631abcb951480a4b057 Mon Sep 17 00:00:00 2001 From: Alex Young Date: Sat, 5 Sep 2020 00:05:54 +0800 Subject: [PATCH] Fix zr update (#517) ZR_HOME is removed from zr docs. And update command changed to 'zr --update' --- src/steps/zsh.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/steps/zsh.rs b/src/steps/zsh.rs index 15f938b2..d41e7565 100644 --- a/src/steps/zsh.rs +++ b/src/steps/zsh.rs @@ -14,14 +14,11 @@ use walkdir::WalkDir; pub fn run_zr(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> { let zsh = require("zsh")?; - env::var("ZR_HOME") - .map(PathBuf::from) - .unwrap_or_else(|_| base_dirs.home_dir().join(".zr")) - .require()?; + require("zr")?; print_separator("zr"); - let cmd = format!("source {} && zr update", zshrc(base_dirs).display()); + let cmd = format!("source {} && zr --update", zshrc(base_dirs).display()); run_type.execute(zsh).args(&["-l", "-c", cmd.as_str()]).check_run() }