Merge pull request #858 from johnjohto/fix-modkit-headless-love

Keep CacheFs.read from crashing when modkit runs headless
This commit is contained in:
bryanthaboi
2026-08-05 11:17:07 -04:00
committed by GitHub
2 changed files with 23 additions and 0 deletions
+3
View File
@@ -294,6 +294,9 @@ function CacheFs.read(rel)
f:close()
return data
end
-- headless (plain luajit, e.g. the modkit validate/pack driver): there is
-- no save directory to read from, so a cache miss is nil, not a crash
if not (love and love.filesystem) then return nil end
return love.filesystem.read(rel)
end