Skip to content

Commit 85ede7d

Browse files
committed
Make install_rms.sh compatible with zsh
Replace bash-specific `read -p` syntax with portable `printf` + `read` combination that works in both bash and zsh. This fixes "no coprocess" error when sourcing the script in zsh shells.
1 parent 47277eb commit 85ede7d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

install_rms.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ if [ "$RMS_INSTALLER" = "developer" ]; then
2828
echo "Using developer mode for RMS installation"
2929
# Check if RMS_PATH is set
3030
if [ -z "$RMS_PATH" ]; then
31-
read -e -p "Please enter full path to your local RMS source code: " RMS_PATH
31+
printf "Please enter full path to your local RMS source code: "
32+
read -r RMS_PATH
3233
fi
3334
# Validate Project.toml exists
3435
if [ ! -f "$RMS_PATH/Project.toml" ]; then
@@ -83,7 +84,8 @@ if [ "$RMS_INSTALLER" = "continuous" ]; then
8384
else
8485
echo " Please confirm that you want to install RMS into the current conda environment: '$current_env'"
8586
echo " If this is not correct, abort and activate the correct environment before rerunning."
86-
read -p "Proceed with installation in '$current_env'? (y/N): " confirm
87+
printf "Proceed with installation in '%s'? (y/N): " "$current_env"
88+
read confirm
8789
case "$confirm" in
8890
[yY][eE][sS]|[yY])
8991
echo "✅ Proceeding with installation in '$current_env'"

0 commit comments

Comments
 (0)