diff options
Diffstat (limited to 'src/luarocks/command_line.lua')
| -rw-r--r-- | src/luarocks/command_line.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua index c885575e..a92a3f9d 100644 --- a/src/luarocks/command_line.lua +++ b/src/luarocks/command_line.lua | |||
| @@ -153,6 +153,11 @@ function command_line.run_command(...) | |||
| 153 | replace_tree(flags, args, root_dir) | 153 | replace_tree(flags, args, root_dir) |
| 154 | end | 154 | end |
| 155 | elseif flags["local"] then | 155 | elseif flags["local"] then |
| 156 | if not cfg.home_tree then | ||
| 157 | die("The --local flag is meant for operating in a user's home directory.\n".. | ||
| 158 | "You are running as a superuser, which is intended for system-wide operation.\n".. | ||
| 159 | "To force using the superuser's home, use --tree explicitly.") | ||
| 160 | end | ||
| 156 | replace_tree(flags, args, cfg.home_tree) | 161 | replace_tree(flags, args, cfg.home_tree) |
| 157 | else | 162 | else |
| 158 | local trees = cfg.rocks_trees | 163 | local trees = cfg.rocks_trees |
