Skip to content

Commit 447e64a

Browse files
committed
avoid potential race condition in script
1 parent 729c52d commit 447e64a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

render-ws-with-mongo-db/db-restore-collections.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ if [[ -z "$DUMP_PATTERN" ]]; then
8989
list_level "$BASE_DUMP_DIR/$P"
9090
done | sort -u)
9191

92-
pick_many "Select one or more ${LABEL}s:" "${CHILDREN[@]}"
93-
94-
if (( $? == 0 )); then
92+
if pick_many "Select one or more ${LABEL}s:" "${CHILDREN[@]}"; then
9593
# Append wildcards for remaining levels to each partial path
9694
STARS=""
9795
for (( R=LVL; R<${#LEVELS[@]}; R++ )); do STARS="${STARS}*/"; done

0 commit comments

Comments
 (0)