From d557f6d59ae4e41619b7f9b1f417cdf4d9b1b0de Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Thu, 19 Jun 2025 19:01:57 -0400 Subject: [PATCH] Add PATH check after binary install --- install.ps1 | 12 ++++++++++++ install.sh | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/install.ps1 b/install.ps1 index 123ed0b..47dbd7b 100755 --- a/install.ps1 +++ b/install.ps1 @@ -49,6 +49,14 @@ function Download-Binary { } } +function Check-LocalBin { + $home = [Environment]::GetFolderPath('UserProfile') + $binPath = Join-Path $home '.local\bin' + if (-not ($Env:PATH.Split(';') -contains $binPath)) { + Write-Host "Add $binPath to your PATH to run VoxVera." + } +} + if (Get-Command pipx -ErrorAction SilentlyContinue) { try { pipx install voxvera --force @@ -61,6 +69,8 @@ if (Get-Command pipx -ErrorAction SilentlyContinue) { if (-not (Download-Binary $url "$dest/voxvera.exe")) { Write-Host 'Binary download failed, falling back to pip' Install-PipFallback + } else { + Check-LocalBin } } } else { @@ -71,6 +81,8 @@ if (Get-Command pipx -ErrorAction SilentlyContinue) { if (-not (Download-Binary $url "$dest/voxvera.exe")) { Write-Host 'Binary download failed, falling back to pip' Install-PipFallback + } else { + Check-LocalBin } } diff --git a/install.sh b/install.sh index 4284036..98d4311 100755 --- a/install.sh +++ b/install.sh @@ -75,6 +75,12 @@ download_binary() { chmod +x "$dest" } +check_local_bin() { + if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then + echo "Add \$HOME/.local/bin to your PATH to run VoxVera." + fi +} + pip_fallback() { if command_exists pip; then echo "Attempting pip install as fallback..." @@ -99,6 +105,8 @@ if command_exists pipx; then if ! download_binary "$url" "$dest"; then echo "Binary download failed, falling back to pip." >&2 pip_fallback + else + check_local_bin fi fi else @@ -109,6 +117,8 @@ else if ! download_binary "$url" "$dest"; then echo "Binary download failed, falling back to pip." >&2 pip_fallback + else + check_local_bin fi fi