feat(parsers): add possibility to install from other branches

More and more Github repos are switching to "main" branch.
Example: `tree-sitter-wasm`
This commit is contained in:
Stephan Seitz 2020-09-22 20:57:49 +02:00 committed by Thomas Vigouroux
parent 58ec0bd7ef
commit 0643fa3003

View file

@ -147,7 +147,14 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync)
info = 'Downloading...',
err = 'Error during download, please verify your internet connection',
opts = {
args = { 'clone', '--single-branch', '--branch', 'master', '--depth', '1', repo.url, project_name },
args = {
'clone',
'--single-branch',
'--branch', repo.branch or 'master',
'--depth', '1',
repo.url,
project_name
},
cwd = cache_folder,
},
},