diff options
Diffstat (limited to 'src/luarocks/install.lua')
-rw-r--r-- | src/luarocks/install.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/luarocks/install.lua b/src/luarocks/install.lua index 260c7751..74602f47 100644 --- a/src/luarocks/install.lua +++ b/src/luarocks/install.lua | |||
@@ -99,6 +99,11 @@ function run(...) | |||
99 | return nil, "Argument missing, see help." | 99 | return nil, "Argument missing, see help." |
100 | end | 100 | end |
101 | 101 | ||
102 | if not flags["local"] and not fs.is_writable(cfg.root_dir) then | ||
103 | return nil, "Your user does not have write permissions in " .. cfg.root_dir .. | ||
104 | " \n-- you may want to run as a privileged user or use your local tree with --local." | ||
105 | end | ||
106 | |||
102 | if name:match("%.rockspec$") or name:match("%.src%.rock$") then | 107 | if name:match("%.rockspec$") or name:match("%.src%.rock$") then |
103 | local build = require("luarocks.build") | 108 | local build = require("luarocks.build") |
104 | return build.run(name) | 109 | return build.run(name) |