Skip to content

Windows: OPENCODE_INSTALL_DIR environment variable is not respected #42536

Closed as not planned

Description

@crxusb-dev

Description

On Windows, setting the OPENCODE_INSTALL_DIR environment variable does not affect the installation location (e.g. D:\215--Python\110--exe\080--OpenCode\). The installer ignores the specified path and always installs the binary to the default directory (e.g. C:\Users\xxx\AppData\Local\Programs\@opencode-aidesktop).

Plugins

no

OpenCode version

v1.18.18

Steps to reproduce

Set OPENCODE_INSTALL_DIR as a Windows user environment variable (e.g. D:\215--Python\110--exe\080--OpenCode) via System Properties → Environment Variables
Open a new terminal and run the install command
The binary is installed to the default path instead of D:\215--Python\110--exe\080--OpenCode
Expected Behavior

Screenshot and/or share link

No response

Operating System

winodws10

Terminal

PowerShell / CMD

Activity

  1. github-actions commented on Aug 14, 2026

    @github-actions
    Contributor

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

    If your issue is the same, please add a comment there instead so the discussion stays consolidated.

  2. crxusb-dev commented on Aug 14, 2026

    @crxusb-dev
    Author

    @JettHayes I’m experiencing the same issue as well. On Windows, setting OPENCODE_INSTALL_DIR does not change the installation location, and the installer still installs to the default directory.

  3. crxusb-dev commented on Aug 14, 2026

    @crxusb-dev
    Author

    @xl2361 I’m experiencing the same issue as well. On Windows, setting OPENCODE_INSTALL_DIR does not change the installation location, and the installer still installs to the default directory.

  4. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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