File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,17 @@ if [ ! -f "requirements.txt" ]; then
8
8
exit 1
9
9
fi
10
10
11
- # Fix SQL whitespace issues before running ruff
11
+ # Fix SQL whitespace issues before running ruff (Linux/macOS compatible)
12
12
echo " Fixing SQL whitespace issues in BigQuery provider..."
13
- find src/models -name " *.py" -type f -exec sed -i ' ' -E ' s/([A-Z]+) +$/\1/g' {} \;
14
- find src/models -name " *.py" -type f -exec sed -i ' ' -E ' s/^( +)$//' {} \;
13
+ if [[ " $OSTYPE " == " darwin" * ]]; then
14
+ # macOS
15
+ find src/models -name " *.py" -type f -exec sed -i ' ' -E ' s/([A-Z]+) +$/\1/g' {} \;
16
+ find src/models -name " *.py" -type f -exec sed -i ' ' -E ' /^[[:space:]]*$/d' {} \;
17
+ else
18
+ # Linux (CI environment)
19
+ find src/models -name " *.py" -type f -exec sed -i -E ' s/([A-Z]+) +$/\1/g' {} \;
20
+ find src/models -name " *.py" -type f -exec sed -i -E ' /^[[:space:]]*$/d' {} \;
21
+ fi
15
22
echo " SQL whitespace issues fixed!"
16
23
17
24
# Run ruff check with auto-fix, including unsafe fixes for typing annotations
You can’t perform that action at this time.
0 commit comments