mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-17 03:57:18 +00:00
fix(serve): use const cwd in POST /session (prefer-const lint)
CI lint failed with packages/cli/src/serve/server.ts:199:9 prefer-const: 'cwd' is never reassigned. The wave-4 rewrite split the original 'let cwd; if (!cwd) cwd = boundWorkspace' into a single ternary, which removes the only mutation path; the variable should be const accordingly.
This commit is contained in:
parent
c922a4e862
commit
1c7f5f069a
1 changed files with 1 additions and 1 deletions
|
|
@ -196,7 +196,7 @@ export function createServeApp(
|
|||
.json({ error: '`cwd` must be a string absolute path when provided' });
|
||||
return;
|
||||
}
|
||||
let cwd = hasCwd ? (body['cwd'] as string) : boundWorkspace;
|
||||
const cwd = hasCwd ? (body['cwd'] as string) : boundWorkspace;
|
||||
if (!path.isAbsolute(cwd)) {
|
||||
res
|
||||
.status(400)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue