Skip to content

Commit

Permalink
add asserts on io in scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dundalek committed Mar 17, 2024
1 parent fefa51a commit f5b07c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/update.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local configurations_directory = 'tmp/nvim-lspconfig/lua/lspconfig/server_config
local lazy_servers = dofile(servers_file)
local servers = {}

local pfile = io.popen("ls '" .. configurations_directory .. "'")
local pfile = assert(io.popen("ls '" .. configurations_directory .. "'"))
for filename in pfile:lines() do
local server = filename:gsub('%.lua$', '')
servers[server] = ""
Expand All @@ -28,6 +28,6 @@ print("Ignoring deprecated: `rome`, `sqls`")
servers.rome = nil
servers.sqls = nil

local f = io.open(servers_file, 'w')
local f = assert(io.open(servers_file, 'w'))
f:write('return ' .. serpent.block(servers, { comment = false }) .. '\n')
f:close()

0 comments on commit f5b07c6

Please sign in to comment.