Refactor(tests): Use os commands in mkdir_p helper

This commit is contained in:
shadmansaleh 2021-06-12 23:09:57 +06:00
parent 48b2092d01
commit b82d8faf53

View File

@ -878,9 +878,11 @@ function module.os_kill(pid)
or 'kill -9 '..pid..' > /dev/null')) or 'kill -9 '..pid..' > /dev/null'))
end end
-- Create directories with non exsisting intermidiate directories -- Create folder with non existing parents
function module.mkdir_p(path) 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 end
module = global_helpers.tbl_extend('error', module, global_helpers) module = global_helpers.tbl_extend('error', module, global_helpers)