Skip to content

Commit 70a6226

Browse files
authored
Add support for trailing slash in inputs.folder, reorganize examples
1 parent 1d4b0e0 commit 70a6226

File tree

7 files changed

+5
-6
lines changed

7 files changed

+5
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ jobs:
77
- uses: actions/checkout@v4
88
- uses: ArkScript-lang/action-format@master
99
with:
10-
folder: example
10+
folder: example/format

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ inputs:
1111
required: true
1212
```
1313

14-
> [!WARNING]
15-
> The folders **MUST NOT** be terminated by a `/`
16-
17-
- **folder**: path to ArkScript files ; will be scanned for `*.ark` files
14+
- **folder**: path to ArkScript files ; will be scanned for `*.ark` files (not recursively)
15+
- eg: `example/`, `example/format`
1816

action.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ runs:
3030
else
3131
echo "✅ $(basename $file)"
3232
fi
33-
done < <(find "${{ inputs.folder }}" -type f -name "*.ark" -maxdepth 1 -print0)
33+
path=${{ inputs.folder }}
34+
done < <(find "${path%/}" -type f -name "*.ark" -maxdepth 1 -print0)
3435
3536
echo "$failures file(s) need to be formatted"
3637
[ $failures -gt 0 ] && exit 1 || exit 0
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)