You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(cli): squad.ps1 blocked by PowerShell execution policy on Windows #758
Command:squad nap (affects all squad CLI commands on Windows)
Error:
File C:\Users\diberry\AppData\Roaming\npm\squad.ps1 cannot be loaded.
The file C:\Users\diberry\AppData\Roaming\npm\squad.ps1 is not digitally signed.
You cannot run this script on the current system.
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Environment:
OS: Windows 11
Shell: PowerShell (default execution policy: Restricted or AllSigned)
Node: v22.14.0
Install: npm install -g @bradygaster/squad-cli
Root Cause
When npm installs a global package on Windows, it creates a .ps1 shim script alongside the .cmd shim in %APPDATA%\npm\. PowerShell prefers .ps1 over .cmd, so it tries to run squad.ps1 — which is unsigned and blocked by default execution policy.
This affects any user who hasn't explicitly relaxed their PowerShell execution policy (Set-ExecutionPolicy RemoteSigned).
Workarounds (for users right now)
Use cmd.exe instead of PowerShell — the .cmd shim works fine
Then squad nap (and all other squad commands) work normally. This is a one-time setting — it tells PowerShell to allow locally-installed scripts while still blocking random downloaded scripts.
Alternative if you don't want to change execution policy:
# Use npx instead (bypasses the .ps1 shim entirely)
npx @bradygaster/squad-cli nap
Activity
diberry commentedon Apr 2, 2026
Quick Fix (verified)
Run this once in PowerShell:
Then
squad nap(and all other squad commands) work normally. This is a one-time setting — it tells PowerShell to allow locally-installed scripts while still blocking random downloaded scripts.Alternative if you don't want to change execution policy:
fix(cli): detect and warn about unsigned .ps1 shim on Windows
fix(cli): detect and warn about unsigned .ps1 shim on Windows
fix: add absolute path guards for npm prefix resolution
fix: add absolute path guards for npm prefix resolution