mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 06:41:22 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -30,11 +30,15 @@ export function upsertSharedEnvVar(params: {
|
||||
|
||||
const nextLines = lines.map((line) => {
|
||||
const match = line.match(matcher);
|
||||
if (!match) return line;
|
||||
if (!match) {
|
||||
return line;
|
||||
}
|
||||
replaced = true;
|
||||
const prefix = match[1] ?? "";
|
||||
const next = `${prefix}${key}=${value}`;
|
||||
if (next !== line) updated = true;
|
||||
if (next !== line) {
|
||||
updated = true;
|
||||
}
|
||||
return next;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user