fix(pac): 收敛 HWLAB runtime GitOps 脚本体积
This commit is contained in:
@@ -102,8 +102,10 @@ function listYamlFiles(root) {
|
||||
}
|
||||
|
||||
function readOverlay() {
|
||||
const file = process.env.UNIDESK_RUNTIME_GITOPS_OVERLAY_FILE;
|
||||
if (file) return JSON.parse(readFileSync(file, "utf8"));
|
||||
const encoded = process.env.UNIDESK_RUNTIME_GITOPS_OVERLAY_B64;
|
||||
if (!encoded) throw new Error("UNIDESK_RUNTIME_GITOPS_OVERLAY_B64 is required");
|
||||
if (!encoded) throw new Error("UNIDESK_RUNTIME_GITOPS_OVERLAY_FILE or UNIDESK_RUNTIME_GITOPS_OVERLAY_B64 is required");
|
||||
return JSON.parse(Buffer.from(encoded, "base64").toString("utf8"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user