From f8b104cb552b823655fb2a35b0a9e66471de446c Mon Sep 17 00:00:00 2001 From: V1K1NGbg Date: Wed, 7 Aug 2024 12:15:51 +0300 Subject: fetch fix started --- src/luarocks/fetch.tl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/luarocks/fetch.tl b/src/luarocks/fetch.tl index bb1fd725..5e6acff1 100644 --- a/src/luarocks/fetch.tl +++ b/src/luarocks/fetch.tl @@ -581,9 +581,17 @@ function fetch.fetch_sources(rockspec: Rockspec, extract: boolean, dest_dir?: st if dir.is_basic_protocol(protocol) then proto = fetch as Fetch else - ok, proto = pcall(require, "luarocks.fetch."..protocol:gsub("[+-]", "_")) as (boolean, Fetch) - if not ok then - return nil, "Unknown protocol "..protocol + local protocolfilename = protocol:gsub("[+-]", "_") + if protocolfilename == "cvs" then + ok, proto = pcall(require, "luarocks.fetch.cvs") as (boolean, Fetch) + if not ok then + return nil, "Unknown protocol "..protocol + end + elseif protocolfilename == "cvs" then + ok, proto = pcall(require, "luarocks.fetch.cvs") as (boolean, Fetch) + if not ok then + return nil, "Unknown protocol "..protocol + end end end -- cgit v1.2.3-55-g6feb