From 51a2d5a60b60f262ccd2f4a3e05fdf729eea7a4d Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Thu, 19 Jun 2025 18:26:41 -0400 Subject: [PATCH] Fix installer fallback when pipx fails --- install.ps1 | 10 +++++++++- install.sh | 17 ++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/install.ps1 b/install.ps1 index f0376b6..6e98b88 100755 --- a/install.ps1 +++ b/install.ps1 @@ -24,7 +24,15 @@ if ($choco) { } if (Get-Command pipx -ErrorAction SilentlyContinue) { - pipx install voxvera --force + try { + pipx install voxvera --force + } catch { + Write-Host 'pipx install failed, downloading binary' + $dest = "$HOME/.local/bin" + New-Item -ItemType Directory -Path $dest -Force | Out-Null + $url = 'https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera.exe' + Invoke-WebRequest -Uri $url -OutFile "$dest/voxvera.exe" + } } else { $dest = "$HOME/.local/bin" New-Item -ItemType Directory -Path $dest -Force | Out-Null diff --git a/install.sh b/install.sh index 2037961..e2b831d 100755 --- a/install.sh +++ b/install.sh @@ -62,7 +62,22 @@ require_pkg qrencode qrencode require_pkg convert imagemagick if command_exists pipx; then - pipx install --force voxvera + if ! pipx install --force voxvera; then + echo "pipx install failed, downloading binary" + install_dir="$HOME/.local/bin" + mkdir -p "$install_dir" + url="https://github.com/PR0M3TH3AN/VoxVera/releases/latest/download/voxvera" + dest="$install_dir/voxvera" + if command_exists curl; then + curl -fsSL "$url" -o "$dest" + elif command_exists wget; then + wget -q "$url" -O "$dest" + else + echo "Install curl or wget to download voxvera" >&2 + exit 1 + fi + chmod +x "$dest" + fi else install_dir="$HOME/.local/bin" mkdir -p "$install_dir"