mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
Merge pull request #14792 from shadmansaleh/refactor/mkdir_p
Refactor(tests): Use os commands in mkdir_p helper
This commit is contained in:
commit
f133ab598f
@ -443,10 +443,7 @@ describe('user config init', function()
|
||||
before_each(function()
|
||||
rmdir(xhome)
|
||||
|
||||
-- TODO, make mkdir_p helper
|
||||
mkdir(xhome)
|
||||
mkdir(xconfig)
|
||||
mkdir(xconfig .. pathsep .. 'nvim')
|
||||
mkdir_p(xconfig .. pathsep .. 'nvim')
|
||||
|
||||
write_file(init_lua_path, [[
|
||||
vim.g.lua_rc = 1
|
||||
|
@ -878,9 +878,11 @@ function module.os_kill(pid)
|
||||
or 'kill -9 '..pid..' > /dev/null'))
|
||||
end
|
||||
|
||||
-- Create directories with non exsisting intermidiate directories
|
||||
-- Create folder with non existing parents
|
||||
function module.mkdir_p(path)
|
||||
return module.meths.call_function('mkdir', {path, 'p'})
|
||||
return os.execute((iswin()
|
||||
and 'mkdir '..path
|
||||
or 'mkdir -p '..path))
|
||||
end
|
||||
|
||||
module = global_helpers.tbl_extend('error', module, global_helpers)
|
||||
|
Loading…
Reference in New Issue
Block a user