r/opencode • • 28m ago

How to fix missing shell output

Check %USERPROFILE%/pwsh.bat and if its empty replace it with

@echo off

setlocal

set "PWSH=C:\Program Files\PowerShell\7\7\pwsh.exe"

if exist "%PWSH%" (

"%PWSH%" %*

exit /b %ERRORLEVEL%

)

where pwsh.exe >nul 2>nul

if %ERRORLEVEL% equ 0 (

pwsh.exe %*

exit /b %ERRORLEVEL%

)

powershell.exe %*

exit /b %ERRORLEVEL%

1 Upvotes

0 comments sorted by