mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
test(release): strip BOM from Windows smoke config
This commit is contained in:
@@ -68,7 +68,10 @@ const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
const configPath = process.env.OPENCLAW_PARALLELS_AGENT_CONFIG_PATH;
|
||||
const payload = JSON.parse(process.env.OPENCLAW_PARALLELS_AGENT_CONFIG_PATCH || "{}");
|
||||
const cfg = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {};
|
||||
function readJsonFile(filePath) {
|
||||
return JSON.parse(fs.readFileSync(filePath, "utf8").replace(/^\\uFEFF/u, ""));
|
||||
}
|
||||
const cfg = fs.existsSync(configPath) ? readJsonFile(configPath) : {};
|
||||
cfg.agents = cfg.agents && typeof cfg.agents === "object" ? cfg.agents : {};
|
||||
cfg.agents.defaults = cfg.agents.defaults && typeof cfg.agents.defaults === "object" ? cfg.agents.defaults : {};
|
||||
cfg.agents.defaults.skipBootstrap = true;
|
||||
|
||||
@@ -344,6 +344,7 @@ console.log(JSON.stringify(result));
|
||||
expect(powershell).toContain("config set --batch-file");
|
||||
expect(powershell).toContain("agents.defaults.skipBootstrap");
|
||||
expect(powershell).toContain("tools.profile");
|
||||
expect(powershell).toContain("replace(/^\\\\uFEFF/u");
|
||||
|
||||
const npmUpdateScripts = readFileSync(TS_PATHS.npmUpdateScripts, "utf8");
|
||||
expect(npmUpdateScripts).toContain("posixAgentWorkspaceScript");
|
||||
|
||||
Reference in New Issue
Block a user