Skip to content

Commit 43635a6

Browse files
committed
Only include --grep if TAG is not empty
1 parent 29bb927 commit 43635a6

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

run-with-params.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ echo " WORKERS: $WORKERS"
77
echo " RETRIES: $RETRIES"
88
echo " TAG: $TAG"
99

10-
# Safely construct the command with proper quoting
11-
npx playwright test \
12-
--project="${BROWSER}" \
13-
--workers="${WORKERS}" \
14-
--retries="${RETRIES}" \
15-
${TAG}
10+
# Build the base command
11+
CMD="npx playwright test --project=${BROWSER} --workers=${WORKERS} --retries=${RETRIES}"
12+
13+
# Add tag conditionally
14+
if [[ -n "$TAG" ]]; then
15+
CMD="$CMD --grep \"$TAG\""
16+
fi
17+
18+
echo "Executing: $CMD"
19+
eval $CMD
20+
git add

0 commit comments

Comments
 (0)