Do not run expensive env initializations for non-interactive shells
This commit is contained in:
parent
87ced67ef2
commit
03e0518f6f
4 changed files with 13 additions and 1 deletions
2
env/50_rust.zsh
vendored
2
env/50_rust.zsh
vendored
|
|
@ -1,6 +1,6 @@
|
|||
export RUSTUP_HOME="${XDG_DATA_HOME}/rustup"
|
||||
export CARGO_HOME="${XDG_DATA_HOME}/cargo"
|
||||
export PATH="${CARGO_HOME}/bin:${PATH}"
|
||||
if which rustup &>/dev/null && [[ -n $(rustup show active-toolchain) ]]; then
|
||||
if [[ $- == *i* ]] && which rustup &>/dev/null && [[ -n $(rustup show active-toolchain) ]]; then
|
||||
export RUST_SRC_PATH=$(rustup run stable rustc --print sysroot)/lib/rustlib/src/rust/src
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue