yymaxapi 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/yymaxapi.js +13 -0
- package/package.json +1 -1
package/bin/yymaxapi.js
CHANGED
|
@@ -436,6 +436,19 @@ function getConfigPath() {
|
|
|
436
436
|
candidates.push(...openclawCandidates, ...moltbotCandidates);
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
+
// Fallback: 当前用户非 root 时,也检查 /root 下的配置(OpenClaw 常以 root 安装)
|
|
440
|
+
if (process.platform !== 'win32' && homeDir !== '/root') {
|
|
441
|
+
const rootOpenclawDir = '/root/.openclaw';
|
|
442
|
+
const rootClawdbotDir = '/root/.clawdbot';
|
|
443
|
+
candidates.push(
|
|
444
|
+
path.join(rootOpenclawDir, 'openclaw.json'),
|
|
445
|
+
path.join(rootOpenclawDir, 'moltbot.json'),
|
|
446
|
+
path.join(rootClawdbotDir, 'openclaw.json'),
|
|
447
|
+
path.join(rootClawdbotDir, 'clawdbot.json'),
|
|
448
|
+
path.join(rootClawdbotDir, 'moltbot.json')
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
|
|
439
452
|
const defaultConfig = preferMoltbot
|
|
440
453
|
? path.join(moltbotPrimaryDir, 'moltbot.json')
|
|
441
454
|
: path.join(openclawStateDir, 'openclaw.json');
|