Skip to content

Commit

Permalink
not sure whats going on with REPLY
Browse files Browse the repository at this point in the history
  • Loading branch information
joelmccracken committed Dec 27, 2024
1 parent de8c4c7 commit 0099a51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ws_tool/lib/bootstrap_doctor.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
}
Expand Down
9 changes: 8 additions & 1 deletion ws_tool/test/installation_process.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0099a51

Please sign in to comment.