From 919c4015d4383f1733cd0b718b5a57c98e876ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= <sumneko@hotmail.com> Date: Wed, 11 Aug 2021 11:01:07 +0800 Subject: [PATCH] merge cpath --- platform.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform.lua b/platform.lua index 3f0ed9fea..85a948fad 100644 --- a/platform.lua +++ b/platform.lua @@ -9,7 +9,9 @@ local function findExePath() end local exePath = findExePath() +local exeDir = exePath:match('(.+)[/\\][%w_.-]+$') local dll = package.cpath:match '[/\\]%?%.([a-z]+)' +package.cpath = ('%s/?.%s;%s'):format(exeDir, dll, package.cpath) local bee = package.searchpath('bee', package.cpath) if not bee then error('Can not find bee.dll? cpath = ' .. tostring(package.cpath)) @@ -19,11 +21,13 @@ if not ok then error(([[It doesn't seem to support your OS, please build it in your OS, see https://github.com/sumneko/vscode-lua/wiki/Build errorMsg: %s exePath: %s +exeDir: %s dll: %s cpath: %s ]]):format( err, exePath, + exeDir, dll, package.cpath )) -- GitLab