Install script doesn't respect $ZDOTDIR for zsh config detection #5873

Closed
opened 2026-02-16 17:57:48 -05:00 by yindo · 0 comments
Owner

Originally created by @samiulsami on GitHub (Jan 14, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

The install script checks $HOME/.zshrc for zsh users, but doesn't respect the ZDOTDIR environment variable.
Per the zsh manual: "If ZDOTDIR is unset, HOME is used instead." Users with ZDOTDIR set expect their config files to be in $ZDOTDIR, not $HOME.

Plugins

N/A

OpenCode version

v1.1.20

Steps to reproduce

With ZDOTDIR set, Run

curl -fsSL https://opencode.ai/install | bash

Observe that the path has been added to $HOME/.zshenv or $XDG_CONFIG_HOME/.zshenv

Screenshot and/or share link

Image

Operating System

Arch Linux x86_64

Terminal

Ghostty 1.2.3-arch2

Originally created by @samiulsami on GitHub (Jan 14, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description The install script checks `$HOME/.zshrc` for zsh users, but doesn't respect the `ZDOTDIR` environment variable. Per the zsh manual: "If ZDOTDIR is unset, HOME is used instead." Users with `ZDOTDIR` set expect their config files to be in `$ZDOTDIR`, not `$HOME`. ### Plugins N/A ### OpenCode version v1.1.20 ### Steps to reproduce With ZDOTDIR set, Run ```bash curl -fsSL https://opencode.ai/install | bash ``` Observe that the path has been added to $HOME/.zshenv or $XDG_CONFIG_HOME/.zshenv ### Screenshot and/or share link <img width="615" height="470" alt="Image" src="https://github.com/user-attachments/assets/1792db93-ec92-40d5-9769-2d144ba9b3c5" /> ### Operating System Arch Linux x86_64 ### Terminal Ghostty 1.2.3-arch2
yindo added the bug label 2026-02-16 17:57:48 -05:00
yindo closed this issue 2026-02-16 17:57:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5873