Skip to content

Commit

Permalink
analyzer: use latest install script when updating (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm authored Apr 1, 2024
1 parent cae4a2c commit 95869fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions src/up.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import term
import os

pub const analyzer_install_script_download_path = 'https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh'
pub const analyzer_install_script_path = os.join_path(os.home_dir(), '.config', 'v-analyzer',
'install.vsh')
pub const analyzer_install_script_path = os.join_path(os.vtmp_dir(), 'v-analzyer', 'install.vsh')

fn up_cmd(cmd cli.Command) ! {
download_install_vsh()!
Expand Down
4 changes: 0 additions & 4 deletions src/utils.v
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ pub fn successln(msg string) {
}

pub fn download_install_vsh() ! {
if os.exists(analyzer_install_script_path) {
return
}

http.download_file(analyzer_install_script_download_path, analyzer_install_script_path) or {
return error('Failed to download script: ${err}')
}
Expand Down

0 comments on commit 95869fa

Please sign in to comment.