aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/rep.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/luarocks/rep.lua b/src/luarocks/rep.lua
index eaedb991..ffe5a87c 100644
--- a/src/luarocks/rep.lua
+++ b/src/luarocks/rep.lua
@@ -280,6 +280,7 @@ function delete_version(name, version)
280 local target = dir.path(deploy_dir, file) 280 local target = dir.path(deploy_dir, file)
281 if type(sub) == "table" then 281 if type(sub) == "table" then
282 local ok, err = delete_deployed_file_tree(sub, target) 282 local ok, err = delete_deployed_file_tree(sub, target)
283 if not ok then return nil, err end
283 fs.remove_dir_if_empty(target) 284 fs.remove_dir_if_empty(target)
284 else 285 else
285 local versioned = path.versioned_name(target, name, version) 286 local versioned = path.versioned_name(target, name, version)
@@ -294,6 +295,10 @@ function delete_version(name, version)
294 end 295 end
295 296
296 local rock_manifest = manif.load_rock_manifest(name, version) 297 local rock_manifest = manif.load_rock_manifest(name, version)
298 if not rock_manifest then
299 return nil, "rock_manifest file not found for "..name.." "..version.." - not a LuaRocks 2 tree?"
300 end
301
297 local ok, err = true 302 local ok, err = true
298 if rock_manifest.bin then 303 if rock_manifest.bin then
299 ok, err = delete_deployed_file_tree(rock_manifest.bin, cfg.deploy_bin_dir) 304 ok, err = delete_deployed_file_tree(rock_manifest.bin, cfg.deploy_bin_dir)