When we use set -xv
to debug a shell script, for every single command we get the entire execution path of utilities like rvm. It repeats for every single command in our script
What is a good way to avoid source
ing RVM?
cd ${code_path}
+ cd ./lambda-functions/spec-validator
+ __zsh_like_cd cd ./lambda-functions/spec-validator
+ typeset __zsh_like_cd_hook
+ builtin cd ./lambda-functions/spec-validator
+ for __zsh_like_cd_hook in chpwd "${chpwd_functions[@]}"
+ typeset -f chpwd
+ for __zsh_like_cd_hook in chpwd "${chpwd_functions[@]}"
+ typeset -f __rvm_cd_functions_set
+ __rvm_cd_functions_set
+ __rvm_do_with_env_before
+ [[ -n '' ]]
+ [[ -n /opt/circleci/.rvm ]]
+ source /opt/circleci/.rvm/scripts/initialize
#!/usr/bin/env bash