1diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
2index 5b057256d9890bc5a50f913e430666fdf0238262..16e244be5bb963d6c02c7e2c27772cbc514a3677 100644
3--- a/oh-my-zsh.sh
4+++ b/oh-my-zsh.sh
5@@ -1,3 +1,6 @@
6+# If ZSH is not defined, use the current script's directory.
7+[[ -z "$ZSH" ]] && export ZSH="${${(%):-%x}:a:h}"
8+
9 # Set ZSH_CACHE_DIR to the path where cache files should be created
10 # or else we will use the default cache/
11 if [[ -z "$ZSH_CACHE_DIR" ]]; then