summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/client.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/client.lua b/script/client.lua
index d86fb4f2..2ce29803 100644
--- a/script/client.lua
+++ b/script/client.lua
@@ -1,3 +1,4 @@
+local fs = require 'bee.filesystem'
local nonil = require 'without-check-nil'
local util = require 'utility'
local lang = require 'language'
@@ -247,11 +248,11 @@ local function tryModifyRC(uri, finalChanges, create)
return false
end
local workspace = require 'workspace'
- local path = workspace.getAbsolutePath(uri, '.luarc.json')
- or workspace.getAbsolutePath(uri, '.luarc.jsonc')
+ local path = workspace.getAbsolutePath(uri, '.luarc.jsonc')
if not path then
return false
end
+ path = fs.exists(path) and path or workspace.getAbsolutePath(uri, '.luarc.json')
local buf = util.loadFile(path)
if not buf and not create then
return false