[PR #1129] [MERGED] Added install dir priority & user feedback #9822

Closed
opened 2026-02-16 18:14:13 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1129
Author: @opencode-agent[bot]
Created: 7/18/2025
Status: Merged
Merged: 7/18/2025
Merged by: @thdxr

Base: devHead: opencode/issue1124-20250718_180501


📝 Commits (1)

  • 28b7de0 Added install dir priority & user feedback

📊 Changes

2 files changed (+28 additions, -1 deletions)

View changed files

📝 README.md (+15 -0)
📝 install (+13 -1)

📄 Description

Perfect! I've successfully implemented the feature request according to the style guide. The changes include:

  1. Installation directory priority logic - Added the requested priority order: $OPENCODE_INSTALL_DIR$XDG_BIN_DIR$HOME/bin$HOME/.opencode/bin

  2. User feedback - Added a message showing which directory was chosen for installation

  3. Documentation - Updated the README with clear examples of how to use the new environment variables

The implementation follows the style guide by:

  • Using single word variable names (INSTALL_DIR)
  • Avoiding unnecessary else statements with the elif chain
  • Inlining the functionality rather than creating helper functions
  • Using proper error handling with 2>/dev/null for the mkdir attempt

The script now respects XDG Base Directory Specification and provides users with flexible installation options while maintaining backward compatibility.

Closes #1124

view session | view log


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1129 **Author:** [@opencode-agent[bot]](https://github.com/apps/opencode-agent) **Created:** 7/18/2025 **Status:** ✅ Merged **Merged:** 7/18/2025 **Merged by:** [@thdxr](https://github.com/thdxr) **Base:** `dev` ← **Head:** `opencode/issue1124-20250718_180501` --- ### 📝 Commits (1) - [`28b7de0`](https://github.com/anomalyco/opencode/commit/28b7de0b8595400b45872013a36f6298440615a1) Added install dir priority & user feedback ### 📊 Changes **2 files changed** (+28 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+15 -0) 📝 `install` (+13 -1) </details> ### 📄 Description Perfect! I've successfully implemented the feature request according to the style guide. The changes include: 1. **Installation directory priority logic** - Added the requested priority order: `$OPENCODE_INSTALL_DIR` → `$XDG_BIN_DIR` → `$HOME/bin` → `$HOME/.opencode/bin` 2. **User feedback** - Added a message showing which directory was chosen for installation 3. **Documentation** - Updated the README with clear examples of how to use the new environment variables The implementation follows the style guide by: - Using single word variable names (`INSTALL_DIR`) - Avoiding unnecessary else statements with the elif chain - Inlining the functionality rather than creating helper functions - Using proper error handling with `2>/dev/null` for the mkdir attempt The script now respects XDG Base Directory Specification and provides users with flexible installation options while maintaining backward compatibility. Closes #1124 [view session](https://opencode.ai/s/h37GKyF0) | [view log](/sst/opencode/actions/runs/16377256989) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:13 -05:00
yindo closed this issue 2026-02-16 18:14:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9822