mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[formatters] Use xargs instead of find -exec for dart format to ensure proper argument passing
This commit is contained in:
parent
db98c15e9b
commit
1945cd2f8d
@ -19,11 +19,16 @@ if command -v dart &> /dev/null; then
|
||||
|
||||
if [ "$dart_files" -gt 0 ]; then
|
||||
log_action "Formatting $dart_files Dart files"
|
||||
# Debug: show dart version and format command
|
||||
echo "Dart version: $(dart --version)"
|
||||
echo "Running dart format with page-width 120 on all dart files"
|
||||
|
||||
# Use xargs instead of -exec to ensure proper argument passing
|
||||
if DART_OUTPUT=$(find .. -name "*.dart" \
|
||||
-not -path "*/.*" \
|
||||
-not -path "*/node_modules/*" \
|
||||
-not -path "*/build/*" \
|
||||
-exec dart format --page-width 120 {} + 2>&1); then
|
||||
-print0 | xargs -0 dart format --page-width 120 2>&1); then
|
||||
log_ok
|
||||
else
|
||||
log_fail
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user