Skip to content

OPENCODE_INSTALL_DIR environment variable is ignored on Windows #28437

Closed as not planned

Description

@JettHayes

Description

Title

OPENCODE_INSTALL_DIR environment variable is ignored on Windows — binary always installs to default path

What happened?

Setting the OPENCODE_INSTALL_DIR environment variable on Windows has no effect. The installer always places the binary in the default hardcoded path regardless of the environment variable value.

Steps to Reproduce

  1. Set OPENCODE_INSTALL_DIR as a Windows user environment variable (e.g. D:\OpenCode) via System Properties → Environment Variables
  2. Open a new terminal and run the install command
  3. The binary is installed to the default path instead of D:\OpenCode

Expected Behavior

The installer should respect OPENCODE_INSTALL_DIR and place the binary in the specified directory.

Actual Behavior

The binary is installed to the default Windows path, ignoring OPENCODE_INSTALL_DIR entirely.

Environment

  • OS: Windows 11
  • Shell: PowerShell / CMD

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on May 20, 2026

    @github-actions
    Contributor

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

    If your issue is distinct from the above, please add a comment clarifying how it differs.

  2. JettHayes commented on May 20, 2026

    @JettHayes
    Author

    Still reproducible on Windows 11 as of May 2026. Setting OPENCODE_INSTALL_DIR as a Windows user environment variable has no effect — the installer always falls back to the default path. This is not fixed.

  3. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions