The read command with the -p option is not the same for zsh as zsh refers to reading from a coprocess. If running ZSH an error is presented and the script continues without setting the variable value.
In the worst case (do while input is invalid) this results in an infinite loop until the process is exited.
ZITI_HOME has not been set. Do you want to use the default ZITI_HOME: /Users/geoffberl/.ziti/quickstart/Geoffs-MBP
decideToUseDefaultZitiHome:read:6: -p: no coprocess
Answer is not valid. Please answer yes or no. (y/n [yes/NO])
ZITI_HOME has not been set. Do you want to use the default ZITI_HOME: /Users/geoffberl/.ziti/quickstart/Geoffs-MBP
decideToUseDefaultZitiHome:read:6: -p: no coprocess
Answer is not valid. Please answer yes or no. (y/n [yes/NO])
ZITI_HOME has not been set. Do you want to use the default ZITI_HOME: /Users/geoffberl/.ziti/quickstart/Geoffs-MBP
decideToUseDefaultZitiHome:read:6: -p: no coprocess
Answer is not valid. Please answer yes or no. (y/n [yes/NO])
ZITI_HOME has not been set. Do you want to use the default ZITI_HOME: /Users/geoffberl/.ziti/quickstart/Geoffs-MBP
decideToUseDefaultZitiHome:read:6: -p: no coprocess
Recommendation: use echo -en "message" followed by a read command without the -p option
The
read
command with the-p
option is not the same for zsh as zsh refers to reading from a coprocess. If running ZSH an error is presented and the script continues without setting the variable value.In the worst case (do while input is invalid) this results in an infinite loop until the process is exited.
Recommendation: use
echo -en "message"
followed by aread
command without the-p
option