From ed96623fb642247d91c9bb32eafef5efad253f1c Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sun, 2 Dec 2018 12:06:15 +0200 Subject: [PATCH] fix "file not found" errors when Rust is not installed --- lib/path.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/path.zsh b/lib/path.zsh index 99a3047..202ddc3 100644 --- a/lib/path.zsh +++ b/lib/path.zsh @@ -44,7 +44,7 @@ path=(~/bin ~/.local/bin "${path[@]}") fpath=("$DOTFILES_PATH/completions" "${fpath[@]}") # check for Rust installed via rustup -if rust_sysroot="$(~/.cargo/bin/rustc --print sysroot)"; then +if rust_sysroot="$(~/.cargo/bin/rustc --print sysroot 2> /dev/null)"; then # add paths to the current Rust toolchain path=(~/.cargo/bin "${path[@]}") fpath=("$rust_sysroot/share/zsh/site-functions" "${fpath[@]}")