summaryrefslogtreecommitdiff
path: root/platform.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-05 23:02:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-05 23:02:21 +0800
commit924cae8130bc46e50a17f8beaf40315a241e2cad (patch)
tree82f282949eaaada63331013dac7b753d9c758685 /platform.lua
parent9c03601143094f6552a90b7e3f4975594bc00553 (diff)
downloadlua-language-server-924cae8130bc46e50a17f8beaf40315a241e2cad.zip
#284 Unbind the binary file from the script file
Diffstat (limited to 'platform.lua')
-rw-r--r--platform.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform.lua b/platform.lua
index 46656fda..6c9d7c09 100644
--- a/platform.lua
+++ b/platform.lua
@@ -29,8 +29,9 @@ cpath: %s
))
end
+local currentPath = debug.getinfo(1, 'S').source:sub(2)
local fs = require 'bee.filesystem'
-local rootPath = fs.path(exePath):parent_path():parent_path():remove_filename():string()
+local rootPath = fs.path(currentPath):remove_filename():string()
if dll == '.dll' then
rootPath = rootPath:gsub('/', '\\')
package.path = rootPath .. script .. '\\?.lua'