Skip to content

Commit

Permalink
update the git clone options for install.vsh
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Jan 22, 2024
1 parent 62d925e commit ab4b92b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions install.vsh
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ fn get_latest_commit_hash() !string {
return hash_res.output.trim_space()
}

const git_clone_options = '--filter=blob:none --recursive --shallow-submodules'

fn install_from_sources(no_interaction bool) ! {
println('${term.yellow('[WARNING]')} Currently ${term.bold('v-analyzer')} has no prebuilt binaries for your platform')

Expand All @@ -289,7 +291,7 @@ fn install_from_sources(no_interaction bool) ! {
warnln('${term.bold('v-analyzer')} is not installed!')
println('')
println('${term.bold('[NOTE]')} If you want to build it from sources manually, run the following commands:')
println('git clone https://github.com/vlang/v-analyzer.git')
println('git clone ${git_clone_options} https://github.com/vlang/v-analyzer.git')
println('cd v-analyzer')
println('v build.vsh')
println(term.gray('# Optionally you can move the binary to the standard location:'))
Expand Down Expand Up @@ -319,7 +321,7 @@ fn install_from_sources(no_interaction bool) ! {
fn clone_repository() ! {
println('Cloning ${term.bold('v-analyzer')} repository...')

exit_code := run_command('git clone https://github.com/vlang/v-analyzer.git ${analyzer_sources_path} 2>&1') or {
exit_code := run_command('git clone ${git_clone_options} https://github.com/vlang/v-analyzer.git ${analyzer_sources_path} 2>&1') or {
errorln('Failed to clone v-analyzer repository: ${err}')
return
}
Expand Down

0 comments on commit ab4b92b

Please sign in to comment.