aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-lsp-installer/fs.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/lua/nvim-lsp-installer/fs.lua b/lua/nvim-lsp-installer/fs.lua
index 31bc4044..6277921b 100644
--- a/lua/nvim-lsp-installer/fs.lua
+++ b/lua/nvim-lsp-installer/fs.lua
@@ -1,12 +1,8 @@
local uv = vim.loop
local M = {}
-local function escape_quotes(str)
- return string.format("%q", str)
-end
-
function M.mkdirp(path)
- if os.execute("mkdir -p " .. escape_quotes(path)) ~= 0 then
+ if os.execute(("mkdir -p %q"):format(path)) ~= 0 then
error(("mkdirp: Could not create directory %s"):format(path))
end
end
@@ -34,7 +30,7 @@ end
function M.rmrf(path)
-- giggity
- if os.execute("rm -rf " .. escape_quotes(path)) ~= 0 then
+ if os.execute(("rm -rf %q"):format(path)) ~= 0 then
error(("Could not remove LSP server directory %s"):format(path))
end
end