Handle missing env variables

This commit is contained in:
ViViDboarder 2022-01-27 19:31:37 -08:00
parent a2a1326258
commit 1aaba4f1c6

View File

@ -5,8 +5,8 @@ local utils = require("utils")
-- Set backup on
o.backup = true
o.backupdir = table.concat({
vim.env.XDG_DATA_HOME .. "/nvim/backup//",
vim.env.XDG_CONFIG_HOME .. "/nvim/backup//",
(vim.env.XDG_DATA_HOME or "") .. "/nvim/backup//",
(vim.env.XDG_CONFIG_HOME or "") .. "/nvim/backup//",
"~/.config/nvim/backup//",
".",
}, ",")