mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 00:21:46 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -30,7 +30,9 @@ export async function runDaemonInstall(opts: DaemonInstallOptions) {
|
||||
hints?: string[];
|
||||
warnings?: string[];
|
||||
}) => {
|
||||
if (!json) return;
|
||||
if (!json) {
|
||||
return;
|
||||
}
|
||||
emitDaemonActionJson({ action: "install", ...payload });
|
||||
};
|
||||
const fail = (message: string) => {
|
||||
@@ -97,8 +99,11 @@ export async function runDaemonInstall(opts: DaemonInstallOptions) {
|
||||
token: opts.token || cfg.gateway?.auth?.token || process.env.OPENCLAW_GATEWAY_TOKEN,
|
||||
runtime: runtimeRaw,
|
||||
warn: (message) => {
|
||||
if (json) warnings.push(message);
|
||||
else defaultRuntime.log(message);
|
||||
if (json) {
|
||||
warnings.push(message);
|
||||
} else {
|
||||
defaultRuntime.log(message);
|
||||
}
|
||||
},
|
||||
config: cfg,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user