Skip to content

Commit

Permalink
fix v-analyzer up (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
AQMpolyface authored Feb 20, 2025
1 parent 1047c9d commit 154017b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/utils.v
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@ pub fn download_install_vsh() ! {
os.mkdir(download_dir) or { return error('Failed to create tmp dir: ${err}') }
}

http.download_file(analyzer_install_script_download_path, analyzer_install_script_path) or {
mut file := os.create(analyzer_install_script_path) or {
return error('Error creating/opening file for script: ${err}')
}
defer { file.close() }

req := http.get(analyzer_install_script_download_path) or {
return error('Failed to download script: ${err}')
}

file.write(req.body.bytes()) or { return error('Error writing to script file: ${err}') }
}

pub fn call_install_vsh(cmd string) !int {
Expand Down

0 comments on commit 154017b

Please sign in to comment.