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 2
2
3
3
set -euo pipefail
4
4
5
+ echo " Script started with $# arguments"
6
+ echo " Arguments: $* "
7
+ echo " Script location: $( dirname " $0 " ) "
8
+
5
9
cd " $( dirname " $0 " ) /.."
10
+ echo " Changed to directory: $( pwd) "
6
11
7
12
if [ $# -eq 0 ]; then
8
13
echo " Usage: $0 <file-with-paths> [additional-formatter-args...]"
12
17
13
18
FILE_LIST=" $1 "
14
19
20
+ echo " Looking for file: $FILE_LIST "
21
+
15
22
if [ ! -f " $FILE_LIST " ]; then
16
23
echo " Error: File '$FILE_LIST ' not found"
17
24
exit 1
@@ -23,9 +30,9 @@ if ! command -v ktfmt-fast-format &> /dev/null; then
23
30
fi
24
31
25
32
# Process Kotlin files
26
- kt_files= $( grep -E ' \.kt$ ' " $FILE_LIST " | grep -v ' ./buildSrc/build/ ' )
27
- kt_files=$( grep -E ' \.kt$' " $FILE_LIST " | grep -v ' ./buildSrc/build/' )
28
- echo " ==> Found $( echo " $kt_files " | wc -l ) Kotlin files: "
33
+ echo " ==> Looking for Kotlin files "
34
+ kt_files=$( grep -E ' \.kt$' " $FILE_LIST " | grep -v ' ./buildSrc/build/' || true )
35
+ echo " ==> Done looking for Kotlin files"
29
36
30
37
if [[ -n " $kt_files " ]]; then
31
38
echo " ==> will format Kotlin files"
You can’t perform that action at this time.
0 commit comments