修复(08-08-production-deployment-execution): 保留生产预检真实错误码
这个提交包含在:
@@ -234,6 +234,14 @@ export function validatePrismaStatusText(status) {
|
||||
return status;
|
||||
}
|
||||
|
||||
export function assertRemotePreflightResult({ status, stdout, stderr, rawStatus }) {
|
||||
if (status !== 0) {
|
||||
const remoteCode = `${stdout}\n${stderr || ""}`.match(/code=([A-Z0-9_]+)/u)?.[1];
|
||||
fail(remoteCode || "PRODUCTION_PREFLIGHT_REMOTE_FAILED");
|
||||
}
|
||||
if (rawStatus == null) fail("PRISMA_STATUS_OUTPUT_MISSING");
|
||||
}
|
||||
|
||||
function main() {
|
||||
try {
|
||||
const deployServer = String(process.env.DEPLOY_SERVER ?? "").trim();
|
||||
@@ -337,11 +345,12 @@ function main() {
|
||||
|
||||
printStableRemoteSummary(stdout);
|
||||
console.log(`[production-preflight] reportRef=${reportRef(reportDir)}`);
|
||||
if (rawStatus == null) fail("PRISMA_STATUS_OUTPUT_MISSING");
|
||||
if (result.status !== 0) {
|
||||
const remoteCode = `${stdout}\n${result.stderr || ""}`.match(/code=([A-Z0-9_]+)/u)?.[1];
|
||||
fail(remoteCode || "PRODUCTION_PREFLIGHT_REMOTE_FAILED");
|
||||
}
|
||||
assertRemotePreflightResult({
|
||||
status: result.status,
|
||||
stdout,
|
||||
stderr: result.stderr,
|
||||
rawStatus,
|
||||
});
|
||||
console.log("[production-preflight][PASS] 生产目标与迁移只读门禁通过");
|
||||
} catch (error) {
|
||||
const code = error instanceof ProductionPreflightError
|
||||
|
||||
在新工单中引用
屏蔽一个用户