Skip to content

Commit 5358e31

Browse files
committed
Update per review comments
1 parent a02d5c9 commit 5358e31

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plat/unix/update_tags.sh

100644100755
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ if [ -f "$TAGS_FILE" ]; then
100100
echo "Removing references to: $UPDATED_SOURCE"
101101
tab=" "
102102
# use ripgrep if available
103-
if which rg; then
104-
cmd="rg --text -ev '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'"
103+
if command -v rg > /dev/null 2>&1; then
104+
GREP_CMD="rg --noconfig"
105105
else
106-
cmd="grep --text -Ev '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'"
106+
GREP_CMD="grep -E"
107107
fi
108+
cmd="${GREP_CMD} --text -v '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'"
108109
echo "$cmd"
109110
eval "$cmd" || true
110111
INDEX_WHOLE_PROJECT=0

0 commit comments

Comments
 (0)