fix: use fixed plugin data dir so mutex lock is shared across instances
mkdtemp creates unique dirs per process, breaking the mutex. Use a fixed path ~/.opencode-matrix-plugin/ instead.
This commit is contained in:
parent
e4ae5ff997
commit
a5dda163ea
5
index.ts
5
index.ts
|
|
@ -5,7 +5,10 @@ import { SessionManager } from "./session-manager.js"
|
|||
import { loadConfig } from "./config-loader.js"
|
||||
import { log } from "./logger.js"
|
||||
|
||||
const PLUGIN_DATA_DIR = fs.mkdtempSync(`${os.homedir()}/.opencode-matrix-plugin-`)
|
||||
const PLUGIN_DATA_DIR = `${os.homedir()}/.opencode-matrix-plugin`
|
||||
if (!fs.existsSync(PLUGIN_DATA_DIR)) {
|
||||
fs.mkdirSync(PLUGIN_DATA_DIR, { recursive: true })
|
||||
}
|
||||
const LOG_FILE = `${PLUGIN_DATA_DIR}/plugin.log`
|
||||
const SETUP_STARTED_LOG = `${PLUGIN_DATA_DIR}/setup-started.log`
|
||||
const SETUP_ERROR_LOG = `${PLUGIN_DATA_DIR}/setup-error.log`
|
||||
|
|
|
|||
Loading…
Reference in New Issue