aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lpm.lua2
-rw-r--r--t/run.lua4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index b5aeaaa..48f30d6 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -740,7 +740,7 @@ function Addon:install(bottle, installing)
elseif self.remote then
log_progress_action("Fetching repository " .. self.remote .. " into " .. install_path)
local repo = Repository.url(self.remote):fetch()
- common.copy(repo.local_path, temporary_install_path)
+ common.copy(repo.local_path .. (self.path and (PATHSEP .. self.path) or ""), temporary_install_path)
common.rmrf(temporary_install_path .. PATHSEP .. ".git")
common.rmrf(temporary_install_path .. PATHSEP .. ".gitignore")
elseif self.path then
diff --git a/t/run.lua b/t/run.lua
index d774be0..94a13fa 100644
--- a/t/run.lua
+++ b/t/run.lua
@@ -78,6 +78,10 @@ local tests = {
break
end
end
+ local actions = lpm("install encodings")
+ assert_exists(userdir .. "/plugins/encodings.lua")
+ local stat = system.stat(userdir .. "/plugins/encodings.lua")
+ assert(stat.type == "file")
end,
["07_manifest"] = function()
local results = json.decode(io.open("manifest.json", "rb"):read("*all"))