From 8254cd3e69321963673e4909de4ec585adf6a706 Mon Sep 17 00:00:00 2001 From: mpeterv Date: Tue, 5 Jan 2016 13:12:34 +0300 Subject: Remove two unnecessary require calls --- src/luarocks/command_line.lua | 1 - src/luarocks/fetch.lua | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua index e1c9f492..a016fc72 100644 --- a/src/luarocks/command_line.lua +++ b/src/luarocks/command_line.lua @@ -144,7 +144,6 @@ function command_line.run_command(...) end end if not named then - local fs = require("luarocks.fs") local root_dir = fs.absolute_name(flags["tree"]) replace_tree(flags, args, root_dir) end diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index e92aeddf..2c028771 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua @@ -371,7 +371,7 @@ function fetch.fetch_sources(rockspec, extract, dest_dir) local protocol = rockspec.source.protocol local ok, proto if fetch.is_basic_protocol(protocol) then - proto = require("luarocks.fetch") + proto = fetch else ok, proto = pcall(require, "luarocks.fetch."..protocol:gsub("[+-]", "_")) if not ok then -- cgit v1.2.3-55-g6feb