diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/remove.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/luarocks/remove.lua b/src/luarocks/remove.lua index 126cfdc8..8c899a0a 100644 --- a/src/luarocks/remove.lua +++ b/src/luarocks/remove.lua | |||
@@ -87,6 +87,13 @@ function run(...) | |||
87 | 87 | ||
88 | local ok, err = fs.check_command_permissions(flags) | 88 | local ok, err = fs.check_command_permissions(flags) |
89 | if not ok then return nil, err end | 89 | if not ok then return nil, err end |
90 | |||
91 | local rock_type = name:match("%.(rock)$") or name:match("%.(rockspec)$") | ||
92 | local filename = name | ||
93 | if rock_type then | ||
94 | name, version = path.parse_name(filename) | ||
95 | if not name then return nil, "Invalid "..rock_type.." filename: "..filename end | ||
96 | end | ||
90 | 97 | ||
91 | local results = {} | 98 | local results = {} |
92 | search.manifest_search(results, cfg.rocks_dir, search.make_query(name, version)) | 99 | search.manifest_search(results, cfg.rocks_dir, search.make_query(name, version)) |