Skip to content

Commit

Permalink
qa: avoid using echo and grep to determine if an extension is alr…
Browse files Browse the repository at this point in the history
…eady enabled

Signed-off-by: Maximilian Bösing <[email protected]>
  • Loading branch information
boesing committed Aug 19, 2021
1 parent f1841f0 commit d8193a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ EXTENSIONS_TO_INSTALL=()
for EXTENSION in "${EXTENSIONS[@]}"; do

# Check if extension is already enabled
# shellcheck disable=SC2236,SC2143
if [ ! -z "$(echo "${ENABLED_EXTENSIONS}" | grep "${EXTENSION}")" ]; then
REGULAR_EXPRESSION=\\b${EXTENSION}\\b
if [[ "${ENABLED_EXTENSIONS}" =~ $REGULAR_EXPRESSION ]]; then
echo "Extension \"$EXTENSION\" is already enabled."
continue;
fi
Expand Down

0 comments on commit d8193a1

Please sign in to comment.