stevedonovan / Lake

A Lua-based Build Tool
MIT License
132 stars 16 forks source link

empty list as `defines` #35

Open moteus opened 10 years ago

moteus commented 10 years ago
c.shared{
  ....
  defines  = {};
  ....
}

i get: lake.lua:768: attempt to call method 'match' (a nil value) this is in:

function list.concat(ls,pre,sep)
    local res = ''
    for i,v in ipairs(ls) do
        if v ~= '' then
            if v:match '%s' and not v:match '"' then --<--- HERE
                v = quote_if_necessary(v)
            end
            res = res..pre..v..sep
        end
    end
    return res
end