yymaxapi 1.0.5 → 1.0.6
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 +14 -0
- package/package.json +1 -1
package/bin/yymaxapi.js
CHANGED
|
@@ -2852,6 +2852,20 @@ async function installOrUpdateOpenClaw() {
|
|
|
2852
2852
|
}
|
|
2853
2853
|
|
|
2854
2854
|
const actionLabel = currentVersion ? '更新' : '安装';
|
|
2855
|
+
|
|
2856
|
+
// 检测 git(openclaw 的依赖需要 git)
|
|
2857
|
+
const gitCheck = safeExec('git --version');
|
|
2858
|
+
if (!gitCheck.ok) {
|
|
2859
|
+
console.log(chalk.red('\n❌ 未检测到 Git,OpenClaw 安装需要 Git'));
|
|
2860
|
+
if (process.platform === 'win32') {
|
|
2861
|
+
console.log(chalk.cyan(' 请先安装 Git: https://git-scm.com/download/win'));
|
|
2862
|
+
console.log(chalk.gray(' 安装后重新打开终端再试'));
|
|
2863
|
+
} else {
|
|
2864
|
+
console.log(chalk.gray(' 请先安装 Git: sudo apt install git / brew install git'));
|
|
2865
|
+
}
|
|
2866
|
+
return;
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2855
2869
|
const spinner = ora({ text: `正在${actionLabel} OpenClaw...`, spinner: 'dots' }).start();
|
|
2856
2870
|
|
|
2857
2871
|
const isWin = process.platform === 'win32';
|