Skip to content

Commit

Permalink
🐛 Fixes regex bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rickstaa committed Jan 7, 2021
1 parent 09dff6b commit 99c4f4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else
fi

# Check if formatting was requested
regex='\S?(--diff|--check)\S?'
regex='\s?(--diff|--check)\s?'
if [[ "${black_args[*]}" =~ $regex ]]; then
formatting="false"
black_print_str="Checking"
Expand Down Expand Up @@ -66,7 +66,7 @@ if [[ "${formatting}" != "true" ]]; then
fi
else
# Check if black formatted files
regex='\S?[0-9]+\sfiles?\sreformatted(\.|,)\S?'
regex='\s?[0-9]+\sfiles?\sreformatted(\.|,)\s?'
if [[ "${black_output[*]}" =~ $regex ]]; then
echo "::set-output name=is_formatted::true"
else
Expand Down

0 comments on commit 99c4f4f

Please sign in to comment.