Skip to content

Commit 9c599e4

Browse files
committed
fix: incorrect path code & warning
This is what happens without unit tests. Want to get them done but I was waiting on getting a node version first. :sub(2) strips the first character from a string. needed to strip the first two, so :sub(3). also the break in the inner loop to avoid duplicates was causing warnings on whitelisted files, so changed that to skip as well.
1 parent 658a01a commit 9c599e4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@master
19-
- uses: vurv78/[email protected].1
19+
- uses: vurv78/[email protected].2
2020
with:
2121
id: 2466875474
2222
changelog: "Deployment via Github to latest changes"

gma.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,21 +174,21 @@ do
174174
for _, block_pattern in ipairs(blocklist) do
175175
if normalized:match(block_pattern) then
176176
print("Blocked ", normalized)
177-
goto skip
177+
goto cont
178178
end
179179
end
180180

181181
files[#files + 1] = {
182-
path = normalized:sub(2), -- strip initial ./ part
182+
path = normalized:sub(3), -- strip initial ./ part
183183
content = read(path)
184184
}
185185

186-
break
186+
goto cont
187187
end
188188
end
189189

190190
print("Warning: File " .. normalized .. " not whitelisted. Skipping..")
191-
::skip::
191+
::cont::
192192
end
193193

194194
dir:close()

0 commit comments

Comments
 (0)