This repository was archived by the owner on Mar 26, 2026. It is now read-only.
fix(installer): correct opencode installation path to use user home directory#23
Open
elCorbacho wants to merge 1 commit intoGentleman-Programming:mainfrom
Open
Conversation
…irectory Change OpenCode installation path from AppData (Windows) and system-level directories to user home directory (.config/opencode) on all platforms for consistency with standard XDG Base Directory specification. Platform Changes: - Windows: %APPDATA%/opencode → %USERPROFILE%/.config/opencode - macOS/Linux: Already using ~/.config/opencode (no change needed) Files Modified: - scripts/install.ps1: Updated $ToolPaths and display messages - scripts/install.sh: Updated Windows path in get_tool_path function This ensures OpenCode skills and configuration files are installed in the user home directory across all platforms, improving portability and consistency with standard configuration directory conventions.
There was a problem hiding this comment.
Pull request overview
This PR standardizes the Windows OpenCode install location to align with the existing ~/.config/opencode convention used on macOS/Linux, by switching Windows installs from %APPDATA%\opencode\... to %USERPROFILE%\.config\opencode\....
Changes:
- Updated the Windows OpenCode and OpenCode-commands paths in the Bash installer’s
get_tool_path()to use$USERPROFILE/.config/opencode/.... - Updated the PowerShell installer’s
$ToolPathsentries for OpenCode and OpenCode commands to use$env:USERPROFILE\.config\opencode\.... - Updated PowerShell user-facing “next steps” messages to show the new OpenCode config path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/install.sh | Switches Windows OpenCode paths from $APPDATA/opencode/... to $USERPROFILE/.config/opencode/... in get_tool_path(). |
| scripts/install.ps1 | Switches OpenCode install targets from $env:APPDATA\opencode\... to $env:USERPROFILE\.config\opencode\... and updates displayed instructions accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix OpenCode installation path to respect XDG Base Directory specification and ensure consistent behavior across all platforms.
Problem
OpenCode installation was using inconsistent paths:
%APPDATA%/opencode(incorrect - application data directory)~/.config/opencode(correct - user config directory)This inconsistency caused installation failures and configuration lookup issues, as users expected the configuration files to be in their home directory following standard conventions.
Solution
Standardized OpenCode installation path to use user home directory on all platforms:
%USERPROFILE%/.config/opencode(NEW)~/.config/opencode(unchanged)This aligns with the XDG Base Directory specification and ensures the same directory structure across all platforms.
Changes Made
Files Modified
scripts/install.ps1 (6 changes)
\$ToolPaths['opencode']and\$ToolPaths['opencode-commands']to use\$USERPROFILE\.config\opencodescripts/install.sh (2 changes)
get_tool_path()function for bothopencodeandopencode-commandsImpact
%APPDATA%/opencodeshould manually move their configuration to~/.config/opencode~/.config/opencodepathTesting
Related Issues
Fixes installation path inconsistency between platforms