aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/rep.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/luarocks/rep.lua b/src/luarocks/rep.lua
index 8bbc1b52..f8f1f694 100644
--- a/src/luarocks/rep.lua
+++ b/src/luarocks/rep.lua
@@ -209,10 +209,13 @@ function deploy_files(name, version)
209 local ok, err 209 local ok, err
210 if fs.exists(target) then 210 if fs.exists(target) then
211 local new_target, err = resolve_conflict(target, deploy_dir, name, version) 211 local new_target, err = resolve_conflict(target, deploy_dir, name, version)
212 if err == "untracked" then 212 if err == "untracked" then
213 fs.delete(target) 213 fs.delete(target)
214 elseif err then return nil, err.." Cannot install new version." 214 elseif err then
215 else target = new_target end 215 return nil, err.." Cannot install new version."
216 else
217 target = new_target
218 end
216 end 219 end
217 fs.make_dir(dir.dir_name(target)) 220 fs.make_dir(dir.dir_name(target))
218 ok, err = move_fn(source, target) 221 ok, err = move_fn(source, target)