abzcoding / lvim

🧑‍🚀 Bloated LunarVim 🚀
MIT License
471 stars 65 forks source link

Overseer custom template yields an error #134

Closed crisidev closed 1 year ago

crisidev commented 1 year ago

Hello mate, I think there is an issue with the overseer custom template where if I run a test it basically says that the overseer template validation fails expecting a string and finding nil.

Here is the offending code:

  see.register_template { 
     generator = function() 
       local logHandler = io.popen [[fd -e log]] 
       local ret = {} 
       if logHandler then 
         local logs = logHandler:read "*a" 
         logHandler:close() 
         for log in logs:gmatch "([^\r\n]+)" do 
           table.insert(ret, { 
             name = "Show " .. log, 
             builder = function() 
               return { 
                 name = "Show " .. log, 
                 cmd = "tail --follow --retry " .. log, 
               } 
             end, 
             priority = 1000, 
             params = {}, 
           }) 
         end 
       end 
       return ret 
     end, 
   } 
 end

I think the tail fails and ret is just an empty {}.

abzcoding commented 1 year ago

hi dude, thank you

fixed via https://github.com/abzcoding/lvim/commit/665b4d7705f371f8c2d04024b24903951a00e1ad