myagent-ai 1.15.62 → 1.15.63
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/package.json +1 -1
- package/start.js +6 -3
package/package.json
CHANGED
package/start.js
CHANGED
|
@@ -171,7 +171,7 @@ function pipInstall(venvPython, pkgSpec, quiet) {
|
|
|
171
171
|
for (const getMirror of MIRRORS) {
|
|
172
172
|
try {
|
|
173
173
|
const mirrorArgs = getMirror();
|
|
174
|
-
const args = ["-m", "pip", "install", "--disable-pip-version-check"
|
|
174
|
+
const args = ["-m", "pip", "install", "--disable-pip-version-check"];
|
|
175
175
|
if (mirrorArgs.length) args.push(...mirrorArgs);
|
|
176
176
|
if (quiet) args.push("-q");
|
|
177
177
|
args.push(pkgSpec);
|
|
@@ -180,7 +180,9 @@ function pipInstall(venvPython, pkgSpec, quiet) {
|
|
|
180
180
|
});
|
|
181
181
|
return { ok: true, err: "" };
|
|
182
182
|
} catch (e) {
|
|
183
|
-
|
|
183
|
+
// 保留最后 5 行 stderr 作为错误信息
|
|
184
|
+
const raw = (e.stderr || "");
|
|
185
|
+
lastErr = raw.trim().split("\n").slice(-5).join("\n").trim() || e.message || "unknown error";
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
188
|
return { ok: false, err: lastErr };
|
|
@@ -271,7 +273,8 @@ function installAllDeps(venvPython, pkgDir) {
|
|
|
271
273
|
console.log("\x1b[32m✓\x1b[0m");
|
|
272
274
|
} else {
|
|
273
275
|
if (isCore) {
|
|
274
|
-
console.log(
|
|
276
|
+
console.log("\x1b[31m✗\x1b[0m");
|
|
277
|
+
console.log("\x1b[31m " + result.err.split("\n").join("\n ") + "\x1b[0m");
|
|
275
278
|
failedCore.push(pkg);
|
|
276
279
|
} else {
|
|
277
280
|
console.log("\x1b[33m✗ 跳过\x1b[0m");
|