diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-05 23:02:21 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-05 23:02:21 +0800 |
commit | 924cae8130bc46e50a17f8beaf40315a241e2cad (patch) | |
tree | 82f282949eaaada63331013dac7b753d9c758685 | |
parent | 9c03601143094f6552a90b7e3f4975594bc00553 (diff) | |
download | lua-language-server-924cae8130bc46e50a17f8beaf40315a241e2cad.zip |
#284 Unbind the binary file from the script file
-rw-r--r-- | platform.lua | 3 |
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' |