diff options
Diffstat (limited to 'src/luarocks/install.lua')
-rw-r--r-- | src/luarocks/install.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/install.lua b/src/luarocks/install.lua index c4139fd0..6dded8ee 100644 --- a/src/luarocks/install.lua +++ b/src/luarocks/install.lua | |||
@@ -48,7 +48,7 @@ function install.install_binary_rock(rock_file, deps_mode) | |||
48 | return nil, "Incompatible architecture "..arch, "arch" | 48 | return nil, "Incompatible architecture "..arch, "arch" |
49 | end | 49 | end |
50 | if repos.is_installed(name, version) then | 50 | if repos.is_installed(name, version) then |
51 | repos.delete_version(name, version) | 51 | repos.delete_version(name, version, deps_mode) |
52 | end | 52 | end |
53 | 53 | ||
54 | local rollback = util.schedule_function(function() | 54 | local rollback = util.schedule_function(function() |
@@ -87,7 +87,7 @@ function install.install_binary_rock(rock_file, deps_mode) | |||
87 | 87 | ||
88 | util.remove_scheduled_function(rollback) | 88 | util.remove_scheduled_function(rollback) |
89 | rollback = util.schedule_function(function() | 89 | rollback = util.schedule_function(function() |
90 | repos.delete_version(name, version) | 90 | repos.delete_version(name, version, deps_mode) |
91 | end) | 91 | end) |
92 | 92 | ||
93 | ok, err = repos.run_hook(rockspec, "post_install") | 93 | ok, err = repos.run_hook(rockspec, "post_install") |
@@ -166,7 +166,7 @@ function install.command(flags, name, version) | |||
166 | ok, err = install.install_binary_rock(name, deps.get_deps_mode(flags)) | 166 | ok, err = install.install_binary_rock(name, deps.get_deps_mode(flags)) |
167 | end | 167 | end |
168 | if not ok then return nil, err end | 168 | if not ok then return nil, err end |
169 | local name, version = ok, err | 169 | name, version = ok, err |
170 | if (not flags["only-deps"]) and (not flags["keep"]) and not cfg.keep_other_versions then | 170 | if (not flags["only-deps"]) and (not flags["keep"]) and not cfg.keep_other_versions then |
171 | local ok, err = remove.remove_other_versions(name, version, flags["force"], flags["force-fast"]) | 171 | local ok, err = remove.remove_other_versions(name, version, flags["force"], flags["force-fast"]) |
172 | if not ok then util.printerr(err) end | 172 | if not ok then util.printerr(err) end |