diff options
author | Peter Melnichenko <mpeterval@gmail.com> | 2016-05-10 20:28:00 +0300 |
---|---|---|
committer | Peter Melnichenko <mpeterval@gmail.com> | 2016-05-10 20:56:14 +0300 |
commit | 0a56441600eda3d68b0f84039664a282bf407361 (patch) | |
tree | 9216a56f675c0187fbd8372035c00b5411e50178 | |
parent | 8915604a681c997166dbb163fc6e8a0e4e1de1fe (diff) | |
download | luarocks-0a56441600eda3d68b0f84039664a282bf407361.tar.gz luarocks-0a56441600eda3d68b0f84039664a282bf407361.tar.bz2 luarocks-0a56441600eda3d68b0f84039664a282bf407361.zip |
Allow passing --force and --force-fast to `luarocks install` in all cases
When installing an old version of a rock that breaks existing
dependencies, removing previously installed version fails,
and --force is suggested. However, when installing using a rockspec
or a source rock --force and --force-fast are not forwarded to build command.
-rw-r--r-- | src/luarocks/install.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/install.lua b/src/luarocks/install.lua index e7e6bb20..b6af43cc 100644 --- a/src/luarocks/install.lua +++ b/src/luarocks/install.lua | |||
@@ -170,7 +170,7 @@ function install.run(...) | |||
170 | if name:match("%.rockspec$") or name:match("%.src%.rock$") then | 170 | if name:match("%.rockspec$") or name:match("%.src%.rock$") then |
171 | util.printout("Using "..name.."... switching to 'build' mode") | 171 | util.printout("Using "..name.."... switching to 'build' mode") |
172 | local build = require("luarocks.build") | 172 | local build = require("luarocks.build") |
173 | return build.run(name, util.forward_flags(flags, "local", "keep", "deps-mode", "only-deps")) | 173 | return build.run(name, util.forward_flags(flags, "local", "keep", "deps-mode", "only-deps", "force", "force-fast")) |
174 | elseif name:match("%.rock$") then | 174 | elseif name:match("%.rock$") then |
175 | if flags["only-deps"] then | 175 | if flags["only-deps"] then |
176 | ok, err = install.install_binary_rock_deps(name, deps.get_deps_mode(flags)) | 176 | ok, err = install.install_binary_rock_deps(name, deps.get_deps_mode(flags)) |