diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2014-01-03 14:25:38 -0800 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-01-03 14:25:38 -0800 |
commit | a30a946f6684e4ba29ba7db7ea0146fa3d012d7f (patch) | |
tree | 3deeacbf13f473fb934fb1ced449ce308903035a | |
parent | f4b271c51c1c05db92a9a12ca39c2ec5208937e0 (diff) | |
parent | d269a3c3b7896cfe5a03bc0fed8c56d96d563be2 (diff) | |
download | luarocks-a30a946f6684e4ba29ba7db7ea0146fa3d012d7f.tar.gz luarocks-a30a946f6684e4ba29ba7db7ea0146fa3d012d7f.tar.bz2 luarocks-a30a946f6684e4ba29ba7db7ea0146fa3d012d7f.zip |
Merge pull request #214 from Tieske/purge_permission
Fix: Purge command did not check permission for the tree to operate on
-rw-r--r-- | src/luarocks/purge.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/luarocks/purge.lua b/src/luarocks/purge.lua index 285c0f34..8c2164f9 100644 --- a/src/luarocks/purge.lua +++ b/src/luarocks/purge.lua | |||
@@ -44,6 +44,10 @@ function run(...) | |||
44 | if not fs.is_dir(tree) then | 44 | if not fs.is_dir(tree) then |
45 | return nil, "Directory not found: "..tree | 45 | return nil, "Directory not found: "..tree |
46 | end | 46 | end |
47 | |||
48 | local ok, err = fs.check_command_permissions(flags) | ||
49 | if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end | ||
50 | |||
47 | search.manifest_search(results, path.rocks_dir(tree), query) | 51 | search.manifest_search(results, path.rocks_dir(tree), query) |
48 | 52 | ||
49 | local sort = function(a,b) return deps.compare_versions(b,a) end | 53 | local sort = function(a,b) return deps.compare_versions(b,a) end |