mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
fix: consolidate OpenCode config file path and sync on startup
This commit is contained in:
1 parent
d9ee1a67b7
commit
4d7572a4fc
4 files changed
+53
-25
No files matched your search
@@ -1,10 +1,11 @@
|
||||
import { spawn, execSync } from 'child_process'
|
||||
import path from 'path'
|
||||
import { logger } from '../utils/logger'
|
||||
import { getWorkspacePath, ENV } from '../config'
|
||||
import { getWorkspacePath, getOpenCodeConfigFilePath, ENV } from '../config'
|
||||
|
||||
const OPENCODE_SERVER_PORT = ENV.OPENCODE.PORT
|
||||
const OPENCODE_SERVER_DIRECTORY = getWorkspacePath()
|
||||
const OPENCODE_CONFIG_PATH = getOpenCodeConfigFilePath()
|
||||
|
||||
class OpenCodeServerManager {
|
||||
private static instance: OpenCodeServerManager
|
||||
@@ -78,7 +79,7 @@ class OpenCodeServerManager {
|
||||
env: {
|
||||
...process.env,
|
||||
XDG_DATA_HOME: path.join(OPENCODE_SERVER_DIRECTORY, '.opencode/state'),
|
||||
OPENCODE_CONFIG: path.join(OPENCODE_SERVER_DIRECTORY, '.config/opencode/opencode.json')
|
||||
OPENCODE_CONFIG: OPENCODE_CONFIG_PATH
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user