Skip to content

无法使用shell #20603

Closed
Closed

Description

@1353604736

The bash tool appears to be hardcoding a lookup to the Windows Store placeholder path (WindowsApps\pwsh.dll) instead of using the actual PowerShell 7 installation at C:\Program Files\PowerShell\7\pwsh.exe.

Even though pwsh.exe is correctly installed and available in PATH, the tool fails because:

  1. It looks for .dll instead of .exe
  2. It prioritizes the WindowsApps placeholder over the real installation

Plugins

No response

OpenCode version

OpenCode-desktop 1.3.13

Steps to reproduce

opencode-desktop installed by scoop:

  1. Install PowerShell 7 at the default location: C:\Program Files\PowerShell\7\pwsh.exe
  2. Ensure it's in PATH (where.exe pwsh returns the correct path)
  3. Run any bash command in OpenCode (e.g., ls, dir, echo hello)
  4. Observe the error about missing pwsh.dll

Expected Behavior

The bash tool should:

  • Look for pwsh.exe (not .dll)
  • Use the actual PowerShell 7 installation from PATH or standard Program Files location
  • Fall back gracefully if Store version isn't installed

Actual Behavior

Fails immediately with: The application to execute does not exist: 'C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps\pwsh.dll'

Operating System

Windows 11

Terminal

PowerShell 7 (pwsh)

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 2, 2026
  2. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • OpenCode version is empty — please provide the exact version you are using
    • Operating System is empty — please specify your Windows version
    • Terminal is empty — please specify which terminal you are using
    • Steps to reproduce is empty — please describe how to reproduce the issue (e.g. what command you ran, how OpenCode was launched)

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Apr 2, 2026
  4. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    Thank you for updating the issue! It now follows the contributing guidelines and includes all the required information. We appreciate you taking the time to provide clear steps to reproduce and the expected/actual behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)windows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions