mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 02:48:27 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -21,13 +21,17 @@ export async function resolveSandboxContext(params: {
|
||||
workspaceDir?: string;
|
||||
}): Promise<SandboxContext | null> {
|
||||
const rawSessionKey = params.sessionKey?.trim();
|
||||
if (!rawSessionKey) return null;
|
||||
if (!rawSessionKey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const runtime = resolveSandboxRuntimeStatus({
|
||||
cfg: params.config,
|
||||
sessionKey: rawSessionKey,
|
||||
});
|
||||
if (!runtime.sandboxed) return null;
|
||||
if (!runtime.sandboxed) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const cfg = resolveSandboxConfigForAgent(params.config, runtime.agentId);
|
||||
|
||||
@@ -101,13 +105,17 @@ export async function ensureSandboxWorkspaceForSession(params: {
|
||||
workspaceDir?: string;
|
||||
}): Promise<SandboxWorkspaceInfo | null> {
|
||||
const rawSessionKey = params.sessionKey?.trim();
|
||||
if (!rawSessionKey) return null;
|
||||
if (!rawSessionKey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const runtime = resolveSandboxRuntimeStatus({
|
||||
cfg: params.config,
|
||||
sessionKey: rawSessionKey,
|
||||
});
|
||||
if (!runtime.sandboxed) return null;
|
||||
if (!runtime.sandboxed) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const cfg = resolveSandboxConfigForAgent(params.config, runtime.agentId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user