diff --git a/ws_tool/lib/bootstrap_doctor.bash b/ws_tool/lib/bootstrap_doctor.bash index 0b44e9cd..2c65541c 100644 --- a/ws_tool/lib/bootstrap_doctor.bash +++ b/ws_tool/lib/bootstrap_doctor.bash @@ -2,6 +2,8 @@ set -euo pipefail +declare -a REPLY + # bootstrapping and doctoring is closely related enough for now # decide to keep these in the same file. doctor_command() { @@ -60,8 +62,10 @@ get_workstation_properties() { printf -v setprops 'props=("${%s[@]}");' "$ws_props_ptr" eval "$setprops" REPLY=("${props[@]}") + declare -p REPLY else - REPLY=() + REPLY=() + declare -p REPLY fi return 0 } diff --git a/ws_tool/test/installation_process.bats b/ws_tool/test/installation_process.bats index 3967242f..11e1127f 100644 --- a/ws_tool/test/installation_process.bats +++ b/ws_tool/test/installation_process.bats @@ -28,11 +28,18 @@ setup (){ cat <<-EOF > "${WORKSTATION_CONFIG_DIR}/settings.sh" export WORKSTATION_CONFIG_DIR="$WORKSTATION_CONFIG_DIR" export WORKSTATION_DIR="$PROJECT_ROOT" + export workstation_names=(workstation_a workstation_b) +EOF + + cat <<-EOF > "${WORKSTATION_CONFIG_DIR}/settings.workstation_a.sh" + WORKSTATION_NAME=workstation_a EOF cat <<-EOF > "${WORKSTATION_CONFIG_DIR}/config.sh" - export workstation_names=(workstation_a workstation_b) + workstation_props_workstation_a=() + workstation_props_workstation_a+=(prop_ws_current_settings_symlink) EOF + export WORKSTATION_NAME=workstation_a run "${WORKSTATION_DIR}/ws_tool/ws" bootstrap