#1166 validate config (#1195)

This commit is contained in:
Kiyan
2022-04-26 21:11:24 +02:00
committed by GitHub
parent a94f5bf776
commit 3ac443207f
5 changed files with 81 additions and 31 deletions

View File

@@ -9,7 +9,7 @@ local M = {
}
function M.fn(node)
if not M.config.system_open.cmd then
if #M.config.system_open.cmd == 0 then
require("nvim-tree.utils").warn "Cannot open file with system application. Unrecognized platform."
return
end
@@ -53,7 +53,7 @@ end
function M.setup(opts)
M.config.system_open = opts or {}
if not M.config.system_open.cmd then
if #M.config.system_open.cmd == 0 then
if M.config.is_windows then
M.config.system_open = {
cmd = "cmd",