Skip to content

Update broken since v2: Could not detect the installation method #53340

Closed

Description

@NiccoloTosato

Description

Updating OpenCode is broken for any v2 installation based on curl whose $HOME is reachable through a symlink. This is a corner case, but it affects a real class of setups where the home directory is exposed under two different path spellings — for example shared/network homes (/u → /home).

When OpenCode is installed with the official curl installer it lives at:

/u/vagrant/.opencode/bin/opencode (symlinked spelling)
/home/vagrant/.opencode/bin/opencode (same file, canonical spelling)

Updating then fails because the installation method is not recognized.

Plugins

No response

OpenCode version

Tested 2.0.18, 2.0.1

Steps to reproduce

Just create a simlink to the real home, and exploit the symlink as home of the user. Will be the default installation path for the curl installer.

vagrant@vagrant:~$ echo $HOME
/u/vagrant
vagrant@vagrant:~$ realpath $HOME
/home/vagrant
vagrant@vagrant:~$ file /u
/u: symbolic link to /home
vagrant@vagrant:~$ which opencode
/u/vagrant/.opencode/bin/opencode
vagrant@vagrant:~$ realpath $(which opencode)
/home/vagrant/.opencode/bin/opencode
vagrant@vagrant:~$ opencode update
┌  Upgrade
│
■  Could not detect the installation method. Pass --method to choose how to upgrade OpenCode.
│
└  Failed

Screenshot and/or share link

No response

Operating System

Fedora 41, Fedora 44, Ubuntu 24.04.2 LTS

Terminal

No response

Activity

  1. github-actions commented on Oct 5, 2026

    @github-actions
    Contributor

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

  2. NiccoloTosato commented on Oct 8, 2026

    @NiccoloTosato
    Author

    No this is not a duplicate, this concer only the curl installation method.

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