Untrack opencode.json: its shell path is a per-user Windows absolute path

The "shell" field points at C:\Users\<name>\.config\opencode\pwsh.cmd, so
cloning this repo on Linux or macOS left OpenCode trying to exec a shell that
does not exist there.

The file stays untracked on each machine and keeps the UTF-8 fix working
locally. pwsh.cmd remains tracked: it only calls chcp and pwsh.exe from PATH,
so it is portable.
This commit is contained in:
2026-10-09 00:01:49 +08:00
parent 3857c1f051
commit 8ba68d7f9a
2 changed files with 6 additions and 9 deletions
+6 -5
View File
@@ -19,13 +19,14 @@
!/plugins/
!/.gitignore
# Machine config for the UTF-8 shell fix (see https://www.xsinfo.vip/windows/01-opencode-utf8.html).
# OpenCode reads opencode.json from this directory and invokes pwsh.cmd as the shell,
# so both are needed to reproduce a working setup on another machine. Note the shell
# path in opencode.json is absolute and per-user, so it must be edited per machine.
!/opencode.json
# UTF-8 shell launcher (see https://www.xsinfo.vip/windows/01-opencode-utf8.html).
# Portable: it only calls chcp and pwsh.exe from PATH, so it is safe to share.
!/pwsh.cmd
# opencode.json is intentionally NOT tracked: its "shell" field holds an absolute
# per-user Windows path (C:\Users\<name>\...), which breaks OpenCode on Linux/macOS.
# Each machine keeps its own opencode.json and points "shell" at its own pwsh.cmd.
# npm manifest for the sqlite plugin's better-sqlite3 dependency; without it the
# plugin fails to load with "Cannot find package 'better-sqlite3'".
!/package.json
-4
View File
@@ -1,4 +0,0 @@
{
"$schema": "https://opencode.ai/config.json",
"shell": "C:\\Users\\12500\\.config\\opencode\\pwsh.cmd"
}