Skip to content

Commit

Permalink
Merge pull request #26 from 10up/fix/php-syntax-unboundvar
Browse files Browse the repository at this point in the history
fix: enhanced bool flag checking from CI env vars for php-syntax verbose
  • Loading branch information
pablojmarti authored Mar 11, 2024
2 parents c73fc7a + 537fba9 commit 51f0b10
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/php-syntax
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/bash

# Checking if the IS_DEBUG_ENABLED flag is put in the CI environment
IS_DEBUG_ENABLED=$( [ -n "$IS_DEBUG_ENABLED" ] && echo "$IS_DEBUG_ENABLED" || echo "" )

if [[ -n "$IS_DEBUG_ENABLED" ]]; then
if [ "${IS_DEBUG_ENABLED:-false}" = "true" ]; then
# The -P10 option specifies the number of parallel processes (In constrainted CPUs will take approx time for 1 available cpu)
# This will output stdout logs
find . -type f -name '*.php' -not -path '*/vendor/*' -print0 | xargs -0 -n1 -P10 php -l
Expand Down

0 comments on commit 51f0b10

Please sign in to comment.