From 95869fa2058fbc9098f640b87399971c6d7552c0 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Tue, 2 Apr 2024 01:59:20 +0200 Subject: [PATCH] analyzer: use latest install script when updating (#81) --- src/up.v | 3 +-- src/utils.v | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/up.v b/src/up.v index 45f0a782..f9b6e855 100644 --- a/src/up.v +++ b/src/up.v @@ -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()! diff --git a/src/utils.v b/src/utils.v index 5ab99770..d1dec9d2 100644 --- a/src/utils.v +++ b/src/utils.v @@ -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}') }