@@ -132,7 +132,12 @@ marked_root() {
132132holds_an_organ () {
133133 [ -d " $1 /PyAutoMind" ] || [ -d " $1 /PyAutoBrain" ] || [ -d " $1 /PyAutoHeart" ] \
134134 || [ -d " $1 /PyAutoHands" ] || [ -d " $1 /PyAutoMemory" ] || [ -d " $1 /PyAutoGut" ] \
135- || [ -d " $1 /PyAutoNerves" ] || [ -d " $1 /PyAutoCortex" ]
135+ || [ -d " $1 /PyAutoNerves" ] || [ -d " $1 /PyAutoCortex" ] \
136+ || [ -d " $1 /PyAutoScientist" ] || [ -d " $1 /organs/PyAutoMind" ] \
137+ || [ -d " $1 /organs/PyAutoBrain" ] || [ -d " $1 /organs/PyAutoHeart" ] \
138+ || [ -d " $1 /organs/PyAutoHands" ] || [ -d " $1 /organs/PyAutoMemory" ] \
139+ || [ -d " $1 /organs/PyAutoGut" ] || [ -d " $1 /organs/PyAutoNerves" ] \
140+ || [ -d " $1 /organs/PyAutoCortex" ] || [ -d " $1 /organs/PyAutoScientist" ]
136141}
137142
138143# Assigns WORKSPACE_ROOT and WORKSPACE_ROOT_REASON rather than printing: one
@@ -169,7 +174,9 @@ resolve_workspace_root() {
169174 local repo_real root_real
170175 repo_real=" $( readlink -f " $REPO_DIR " 2> /dev/null || printf ' %s' " $REPO_DIR " ) "
171176 for helper in " $REPO_DIR /bin/_pyauto_root.sh" \
172- " $( dirname " $REPO_DIR " ) /PyAutoBrain/bin/_pyauto_root.sh" ; do
177+ " $( dirname " $REPO_DIR " ) /PyAutoBrain/bin/_pyauto_root.sh" \
178+ " $( dirname " $REPO_DIR " ) /organs/PyAutoBrain/bin/_pyauto_root.sh" \
179+ " $( dirname " $( dirname " $REPO_DIR " ) " ) /organs/PyAutoBrain/bin/_pyauto_root.sh" ; do
173180 [ -r " $helper " ] || continue
174181 # `|` separates the two answers; no reason the resolver states contains
175182 # one. The subshell drops this script's `set -euo pipefail` so that a
@@ -205,6 +212,7 @@ resolve_workspace_root() {
205212 # available, and a real path a diagnostic can name.
206213 local parent
207214 parent=" $( dirname " $REPO_DIR " ) "
215+ [ " $( basename " $parent " ) " = organs ] && parent=" $( dirname " $parent " ) "
208216 WORKSPACE_ROOT=" $parent "
209217 if holds_an_organ " $WORKSPACE_ROOT " ; then
210218 WORKSPACE_ROOT_REASON=" beside this checkout"
0 commit comments