aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lpm.c10
-rw-r--r--lpm.lua3
2 files changed, 9 insertions, 4 deletions
diff --git a/lpm.c b/lpm.c
index 4d9db68..6c6d55b 100644
--- a/lpm.c
+++ b/lpm.c
@@ -60,9 +60,13 @@ static int lpm_hash(lua_State* L) {
}
int lpm_symlink(lua_State* L) {
- if (symlink(luaL_checkstring(L, 1), luaL_checkstring(L, 2)))
- return luaL_error(L, "can't create symlink %s: %s", luaL_checkstring(L, 2), strerror(errno));
- return 0;
+ #ifndef _WIN32
+ if (symlink(luaL_checkstring(L, 1), luaL_checkstring(L, 2)))
+ return luaL_error(L, "can't create symlink %s: %s", luaL_checkstring(L, 2), strerror(errno));
+ return 0;
+ #else
+ return luaL_error(L, "can't create symbolic link %s: your operating system sucks", luaL_checkstring(L, 2));
+ #endif
}
int lpm_chmod(lua_State* L) {
diff --git a/lpm.lua b/lpm.lua
index 7b34d2a..80ec805 100644
--- a/lpm.lua
+++ b/lpm.lua
@@ -1212,6 +1212,7 @@ local function lpm_lite_xl_run(version, ...)
for i, str in ipairs({ ... }) do
local name, version = common.split(":", str)
local plugin = get_plugin(name, version, { mod_version = lite_xl.mod_version })
+ if not plugin then error("can't find plugin " .. str) end
table.insert(plugins, plugin)
end
local bottle = Bottle.new(lite_xl, plugins)
@@ -1268,7 +1269,7 @@ local function lpm_plugin_list()
for j,plugin in ipairs(repo.plugins) do
table.insert(result.plugins, {
name = plugin.name,
- status = plugin:is_installed() and "installed" or (system_bottle.lite_xl:is_compatible(plugin) and "available" or "incompatible"),
+ status = plugin:is_installed(system_bottle) and "installed" or (system_bottle.lite_xl:is_compatible(plugin) and "available" or "incompatible"),
version = "" .. plugin.version,
dependencies = plugin.dependencies,
description = plugin.description,