]> git.proxmox.com Git - pve-common.git/commit - src/PVE/Tools.pm
tools: download_file_from_url: improve UX and avoid cyclic dependencies
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Jun 2021 12:11:07 +0000 (14:11 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Jun 2021 12:11:09 +0000 (14:11 +0200)
commit60fb1c2628aec71222a93d211053409b58bb1f86
tree5a3e46598075214baffd32d05d018f66df62a869
parent189f0321caf265547e9f08f88a4f03a3790c0a79
tools: download_file_from_url: improve UX and avoid cyclic dependencies

plus some refactoring

* drop worker, cannot be done here (RPCEnv is in pve-access-control)
* actually output the wrong "got" hash on mismatch
* die on existing file with mismatched
* drop double array for passing cmd
* drop `/usr/bin` prefix
* adapt rename error message
* add error handling for unlinking the temp. file

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Tools.pm