There appears to be a minor issue when luacov attempts to scan over a symbolic link - I suspect the issue is actually in lfs which should return a mode attribute of 'link' for a symbolic link, but instead it returns nil as the attributes table which causes a nil dereference:
lua: .../Cellar/luarocks/3.8.0/share/lua/5.4/luacov/reporter.lua:133: attempt to index a nil value (local 'attr')
stack traceback:
.../Cellar/luarocks/3.8.0/share/lua/5.4/luacov/reporter.lua:133: in local 'add_empty_dir_coverage_data'
.../Cellar/luarocks/3.8.0/share/lua/5.4/luacov/reporter.lua:141: in method 'new'
.../Cellar/luarocks/3.8.0/share/lua/5.4/luacov/reporter.lua:489: in function 'luacov.reporter.report'
...ew/Cellar/luarocks/3.8.0/share/lua/5.4/luacov/runner.lua:134: in function 'luacov.run_report'
...ew/Cellar/luarocks/3.8.0/share/lua/5.4/luacov/runner.lua:147: in upvalue 'on_exit'
...ew/Cellar/luarocks/3.8.0/share/lua/5.4/luacov/runner.lua:469: in function 'luaunit.oldOsExit'
...homebrew/Cellar/luarocks/3.8.0/share/lua/5.4/luaunit.lua:132: in function 'os.exit'
test/test_suite.lua:16: in main chunk
[C]: in ?
I have a work-around which guards against this issue, but does not fix the underlying problem.
There appears to be a minor issue when
luacov
attempts to scan over a symbolic link - I suspect the issue is actually inlfs
which should return amode
attribute of'link'
for a symbolic link, but instead it returnsnil
as the attributes table which causes anil
dereference:I have a work-around which guards against this issue, but does not fix the underlying problem.
Build System Used
Work-around patch to
reporter.lua
Adding an extra guard
attr and
seems to "fix" the issue.line 36:
line 133