Skip to content

Commit

Permalink
fix(installer): prevent invalid temp directory name generation (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Jan 27, 2024
1 parent c06e00e commit 14578d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion installer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ local function set_up_luarocks(install_path)
end

---@diagnostic disable-next-line: param-type-mismatch
local tempdir = vim.fs.joinpath(vim.fn.stdpath("run"), "luarocks-" .. vim.loop.random(7))
local tempdir = vim.fs.joinpath(vim.fn.stdpath("run"), ("luarocks-%X"):format(math.random(256 ^ 7)))

vim.notify("Downloading luarocks...")

Expand Down

0 comments on commit 14578d0

Please sign in to comment.