aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorGuldoman <giulio.lettieri@gmail.com>2024-02-25 23:22:52 +0100
committerGitHub <noreply@github.com>2024-02-25 17:22:52 -0500
commit59a4f6f5018a77f12528dd5d21dd7627b39a54a8 (patch)
tree74bd98a822aa68b9385a13cdfd563fc306baa5aa /src/lpm.lua
parentf264efbee31fbc104a48c41d03fea90fe42eec82 (diff)
downloadlite-xl-plugin-manager-59a4f6f5018a77f12528dd5d21dd7627b39a54a8.tar.gz
lite-xl-plugin-manager-59a4f6f5018a77f12528dd5d21dd7627b39a54a8.zip
Fix Windows install issues (#79)
* Don't create destination path in `Bottle:construct` This avoids that `common.rename` moves the source to the wrong path (`dst/src_basename`). * Fix executable detection in `Bottle:run`
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index a84ee7c..d8cac2f 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1377,7 +1377,7 @@ function Bottle:construct()
end
-- atomically move things
common.rmrf(local_path)
- common.mkdirp(local_path)
+ common.mkdirp(common.dirname(local_path))
common.rename(self.local_path, local_path)
self.local_path = local_path
end
@@ -1391,7 +1391,7 @@ end
function Bottle:run(args)
args = args or {}
if self.is_system then error("system bottle cannot be run") end
- local path = self.local_path .. PATHSEP .. "lite-xl"
+ local path = self.local_path .. PATHSEP .. "lite-xl" .. EXECUTABLE_EXTENSION
if not system.stat(path) then error("cannot find bottle executable " .. path) end
os.execute(path .. (#args > 0 and " " or "") .. table.concat(args, " "))
end