-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
Description
Bug Report: Installation Script Fails on Windows PowerShell 5.1
Environment
- OS: Windows 10/11
- PowerShell Version: 5.1 (Windows PowerShell - default Windows installation)
- Running as Administrator: Yes
Expected Behavior
The installation script should work with both Windows PowerShell 5.1 (default) and PowerShell Core.
Actual Behavior
Script fails immediately with "[ERROR] This installer is for Windows only." when run in Windows PowerShell 5.1, despite being on Windows.
Root Cause
The script uses $IsWindows variable for OS detection, which only exists in PowerShell Core (6.0+). In Windows PowerShell 5.1, this variable is $null, causing the condition if (-not $IsWindows) to evaluate as true.
Steps to Reproduce
- Open Windows PowerShell 5.1 as Administrator (default PowerShell on Windows)
- Run:
iex ((New-Object System.Net.WebClient).DownloadString('https://vapi.ai/install.ps1')) - Script fails with Windows detection error
Workaround
Use PowerShell Core instead:
pwsh -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://vapi.ai/install.ps1'))"