diff --git a/scripts/bootstrap/bootstrap-haskell b/scripts/bootstrap/bootstrap-haskell
index 25ed2995fa4f0bfc0206966515ff8f27c920fce0..a99fdd31f4324fb20769099affed92ff02547f3f 100755
--- a/scripts/bootstrap/bootstrap-haskell
+++ b/scripts/bootstrap/bootstrap-haskell
@@ -403,7 +403,11 @@ download_ghcup() {
 find_shell() {
 	case $SHELL in
 		*/zsh) # login shell is zsh
-			GHCUP_PROFILE_FILE="$HOME/.zshrc"
+			if [ -n "$ZDOTDIR" ]; then
+				GHCUP_PROFILE_FILE="$ZDOTDIR/.zshrc"
+			else
+				GHCUP_PROFILE_FILE="$HOME/.zshrc"
+			fi
 			MY_SHELL="zsh" ;;
 		*/bash) # login shell is bash
 			GHCUP_PROFILE_FILE="$HOME/.bashrc"