fix(editorconfig): add missing root validation (#23462)

This commit is contained in:
Bogdan Grigoruță 2023-05-03 21:26:40 +03:00 committed by GitHub
parent 39caf86e8a
commit 143a178332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,6 +189,7 @@ local function parse(filepath, dir)
end
elseif key ~= nil and val ~= nil then
if key == 'root' then
assert(val == 'true' or val == 'false', 'root must be either "true" or "false"')
opts.root = val == 'true'
elseif pat and pat:match_str(filepath) then
opts[key] = val