aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/manif.lua2
-rw-r--r--src/luarocks/repos.lua7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua
index c17da71e..d0bd5e04 100644
--- a/src/luarocks/manif.lua
+++ b/src/luarocks/manif.lua
@@ -403,7 +403,7 @@ local function find_providers(file, root)
403 403
404 local manifest, err = manif_core.load_local_manifest(path.rocks_dir(root)) 404 local manifest, err = manif_core.load_local_manifest(path.rocks_dir(root))
405 if not manifest then 405 if not manifest then
406 return nil, err .. " -- corrupted local rocks tree?" 406 return nil, "untracked"
407 end 407 end
408 local deploy_bin = path.deploy_bin_dir(root) 408 local deploy_bin = path.deploy_bin_dir(root)
409 local deploy_lua = path.deploy_lua_dir(root) 409 local deploy_lua = path.deploy_lua_dir(root)
diff --git a/src/luarocks/repos.lua b/src/luarocks/repos.lua
index c7b381df..23398cbb 100644
--- a/src/luarocks/repos.lua
+++ b/src/luarocks/repos.lua
@@ -214,7 +214,12 @@ function deploy_files(name, version, wrap_bin_scripts)
214 if fs.exists(target) then 214 if fs.exists(target) then
215 local new_target, err = resolve_conflict(target, deploy_dir, name, version) 215 local new_target, err = resolve_conflict(target, deploy_dir, name, version)
216 if err == "untracked" then 216 if err == "untracked" then
217 fs.delete(target) 217 local backup = target
218 repeat
219 backup = target.."~"
220 until not fs.exists(backup) -- slight race condition here, but shouldn't be a problem.
221 util.printerr("Warning: "..target.." is not tracked by this installation of LuaRocks. Moving it to "..backup)
222 fs.move(target, backup)
218 elseif err then 223 elseif err then
219 return nil, err.." Cannot install new version." 224 return nil, err.." Cannot install new version."
220 else 225 else