diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-07 12:15:51 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-07 12:15:51 +0300 |
commit | f8b104cb552b823655fb2a35b0a9e66471de446c (patch) | |
tree | 8985349e10959f60290efd313a45c3e004d11b37 | |
parent | cef57f360161992b31c9d8c8295a93a0899575ad (diff) | |
download | luarocks-f8b104cb552b823655fb2a35b0a9e66471de446c.tar.gz luarocks-f8b104cb552b823655fb2a35b0a9e66471de446c.tar.bz2 luarocks-f8b104cb552b823655fb2a35b0a9e66471de446c.zip |
fetch fix started
-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 | ||