From c0cdf5bcac871dabc24bcaa680ffef27361dab6d Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 28 May 2021 00:17:20 -0400 Subject: [PATCH] ci/test.lua: fix string splitting string:split() isn't part of the standard library, but is defined if `gui/load-screen.lua` is run. This happens in the default dfhack.init-example and on GitHub Actions, but not on Buildmaster. This is an intermediate solution to get CI working again. A more complete solution would be to move string:split() to dfhack.lua, like string:startswith(), or to take a pass over scripts and make sure they aren't modifying built-in types like string/table. --- ci/test.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/test.lua b/ci/test.lua index 8172e2e2c..07d297e3d 100644 --- a/ci/test.lua +++ b/ci/test.lua @@ -539,12 +539,12 @@ local function main(args) {'d', 'test_dir', hasArg=true, handler=function(arg) test_dir = arg end}, {'m', 'modes', hasArg=true, - handler=function(arg) mode_filter = arg:split(',') end}, + handler=function(arg) mode_filter = utils.split_string(arg, ',') end}, {'r', 'resume', handler=function() resume = true end}, {'s', 'save_dir', hasArg=true, handler=function(arg) save_dir = arg end}, {'t', 'tests', hasArg=true, - handler=function(arg) test_filter = arg:split(',') end}, + handler=function(arg) test_filter = utils.split_string(arg, ',') end}, }) if help then print(help_text) return end