diff options
-rw-r--r-- | src/luarocks/fetch.tl | 14 |
1 files changed, 11 insertions, 3 deletions
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 | |||
581 | if dir.is_basic_protocol(protocol) then | 581 | if dir.is_basic_protocol(protocol) then |
582 | proto = fetch as Fetch | 582 | proto = fetch as Fetch |
583 | else | 583 | else |
584 | ok, proto = pcall(require, "luarocks.fetch."..protocol:gsub("[+-]", "_")) as (boolean, Fetch) | 584 | local protocolfilename = protocol:gsub("[+-]", "_") |
585 | if not ok then | 585 | if protocolfilename == "cvs" then |
586 | return nil, "Unknown protocol "..protocol | 586 | ok, proto = pcall(require, "luarocks.fetch.cvs") as (boolean, Fetch) |
587 | if not ok then | ||
588 | return nil, "Unknown protocol "..protocol | ||
589 | end | ||
590 | elseif protocolfilename == "cvs" then | ||
591 | ok, proto = pcall(require, "luarocks.fetch.cvs") as (boolean, Fetch) | ||
592 | if not ok then | ||
593 | return nil, "Unknown protocol "..protocol | ||
594 | end | ||
587 | end | 595 | end |
588 | end | 596 | end |
589 | 597 | ||