diff options
Diffstat (limited to 'src/luarocks/install.lua')
| -rw-r--r-- | src/luarocks/install.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/luarocks/install.lua b/src/luarocks/install.lua index f9f27ccf..016e73bb 100644 --- a/src/luarocks/install.lua +++ b/src/luarocks/install.lua | |||
| @@ -84,8 +84,9 @@ function install_binary_rock(rock_file) | |||
| 84 | license = ("(license: "..rockspec.description.license..")") | 84 | license = ("(license: "..rockspec.description.license..")") |
| 85 | end | 85 | end |
| 86 | 86 | ||
| 87 | local root_dir = path.root_dir(cfg.rocks_dir) | ||
| 87 | print() | 88 | print() |
| 88 | print(name.." "..version.." is now installed in "..cfg.root_dir.." "..license) | 89 | print(name.." "..version.." is now installed in "..root_dir.." "..license) |
| 89 | 90 | ||
| 90 | util.remove_scheduled_function(rollback) | 91 | util.remove_scheduled_function(rollback) |
| 91 | return true | 92 | return true |
| @@ -107,10 +108,8 @@ function run(...) | |||
| 107 | return nil, "Argument missing, see help." | 108 | return nil, "Argument missing, see help." |
| 108 | end | 109 | end |
| 109 | 110 | ||
| 110 | if not flags["local"] and (fs.exists(cfg.root_dir) and not fs.is_writable(cfg.root_dir)) then | 111 | local ok, err = fs.check_command_permissions(flags) |
| 111 | return nil, "Your user does not have write permissions in " .. cfg.root_dir .. | 112 | if not ok then return nil, err end |
| 112 | " \n-- you may want to run as a privileged user or use your local tree with --local." | ||
| 113 | end | ||
| 114 | 113 | ||
| 115 | if name:match("%.rockspec$") or name:match("%.src%.rock$") then | 114 | if name:match("%.rockspec$") or name:match("%.src%.rock$") then |
| 116 | local build = require("luarocks.build") | 115 | local build = require("luarocks.build") |
